-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
executable file
·64 lines (64 loc) · 1.41 KB
/
docker-compose.yaml
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
63
64
version: "2.1"
services:
mongo:
container_name: mongo
image: mongo:latest
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
ports:
- 27017:27017
volumes:
- ./data/db:/data/db
networks:
mongo_net:
ipv4_address: 172.19.0.3
client:
build:
context: ./client
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./client:/app
ports:
- '3000:3000'
restart: on-failure
links:
- "server"
depends_on:
- "server"
# server:
# condition: service_healthy
container_name: client
networks:
mongo_net:
ipv4_address: 172.19.0.4
server:
build:
context: ./server
dockerfile: Dockerfile.dev
ports:
- '9005:9005'
restart: on-failure
# healthcheck:
# test: ["CMD-SHELL", "/server/healthcheck.sh"]
# interval: 15s
# timeout: 5s
# retries: 5
container_name: server
volumes:
- /app/node_modules # Inside the container, don't try to override this folder, just leave as is
- ./server:/app # Look at the server directory and copy everything into the app folder in the container
networks:
mongo_net:
ipv4_address: 172.19.0.5
links:
- "mongo"
depends_on:
- "mongo"
networks:
mongo_net:
driver: bridge
ipam:
config:
- subnet: "172.19.0.0/16"