-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.28 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
62
63
64
65
66
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
ports:
- "5000:5000"
- "9229:9229"
environment:
NODE_ENV: development
MONGO_URI: ${MONGO_URI}
JWT_SECRET: ${JWT_SECRET}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_SECRET: ${GITHUB_SECRET}
PORT: 5000
depends_on:
- mongo
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
command: npm run server:dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
interval: 30s
timeout: 10s
retries: 5
frontend:
build:
context: ./client
dockerfile: Dockerfile.frontend
ports:
- "3000:3000"
environment:
NODE_ENV: development
PORT: 3000
depends_on:
- backend
volumes:
- ./client:/usr/src/app
- /usr/src/app/node_modules
command: npm start # Runs the React development server
mongo:
image: mongo:5.0
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
volumes:
mongo-data:
driver: local
node_modules_backend:
driver: local
node_modules_frontend:
driver: local
networks:
devnetwork:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16