-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
64 lines (60 loc) · 1.26 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
63
64
version: '3.9'
services:
frontend:
build: ./frontend
ports:
- 5173:5173
volumes:
- ./frontend/src:/app/src
networks:
- react-express
depends_on:
backend:
condition: service_healthy
environment:
DB_API_HOST: backend
healthcheck:
test: ['CMD', 'lsof', '-t', '-i:3000']
timeout: 3s
retries: 5
backend:
container_name: backend
build: ./backend
ports:
- 3001:3001
volumes:
- ./backend/src:/app/src
networks:
- express-mongo
- react-express
environment:
PORT: 3001
MONGO_CONN_STRING: mongodb://root:root@mongo:27017/
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: ['CMD', 'lsof', '-t', '-i:3001']
timeout: 3s
retries: 5
mongo:
image: mongo
container_name: mongo
ports:
- 27017:27017
restart: always
volumes:
- ./data:/data/db
networks:
- express-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 3s
timeout: 3s
retries: 5
networks:
react-express:
express-mongo: