-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (57 loc) · 1.2 KB
/
docker-compose.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
services:
mongo1:
image: mongo:7.0
command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
ports:
- 27017:27017
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo1:27017'}]}) }" | mongosh --port 27017 --quiet
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
volumes:
- "mongo1_data:/data/db"
- "mongo1_config:/data/configdb"
networks:
- mongo-net
api:
image: api-when
env_file:
- ./backend/api/.env
build:
context: ./backend/api/.
volumes:
- type: bind
source: ./backend/api/data
target: /app/data
ports:
- "8080:8080"
networks:
- app-tier
- mongo-net
depends_on:
- mongo1
frontend:
image: frontend-when
build:
context: ./frontend
volumes:
- ./frontend:/root
ports:
- 8066:8066
networks:
- app-tier
depends_on:
- api
networks:
app-tier:
driver: bridge
mongo-net:
driver: bridge
volumes:
mongo1_data:
mongo1_config: