-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
62 lines (58 loc) · 1.35 KB
/
docker-compose-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: "3.8"
services:
client:
build:
context: ./client
dockerfile: Dockerfile.dev
image: "react-frontend-image-dev"
container_name: "react-frontend-container-dev"
# stdin_open: true # May be needed to prevent "immediate exit" issue
ports:
- "3000:3000"
depends_on:
- server
networks:
- app-network
volumes:
- ./client:/app/client:cached
- client_node_modules:/app/client/node_modules:delegated
env_file:
- ./client/.env
command: "npm run start -- --host"
server:
build:
context: ./server
dockerfile: Dockerfile.dev
image: "express-backend-image"
container_name: "express-backend-container"
restart: always
ports:
- "3001:3001"
depends_on:
- database
networks:
- app-network
volumes:
- ./server:/app/server:cached
- ./server/src/logs:/app/server/logs
- server_node_modules:/app/server/node_modules:delegated
env_file:
- ./server/.env
command: "npm run dev"
database:
image: mongo:latest
container_name: mongo-db-container
ports:
- "27017:27017"
environment:
- MONGO_PORT=27017
volumes:
- ./mongo-db-backup:/data/db
networks:
- app-network
volumes:
client_node_modules:
server_node_modules:
networks:
app-network:
driver: bridge