-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
48 lines (48 loc) · 1.05 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
version: "3.1"
# Intended for Development ONLY
services:
backend-nodejs-app: # Main App
build: .
env_file:
- ./.env
volumes:
- ./src:/opt/app/src
ports:
- ${PORT}:${PORT}
- ${DEBUGGER_PORT}:${DEBUGGER_PORT} # Debugger Port
restart: unless-stopped
depends_on:
- backend-redis
- backend-mongo
healthcheck:
test: ["CMD","nc","-z","localhost","3000"]
interval: 20s
timeout: 5s
retries: 3
command: nodemon src/index.js
backend-redis: # Redis
image: redis:5-alpine
restart: unless-stopped
logging:
driver: none
healthcheck:
test: ["CMD","nc","-z","localhost","6379"]
interval: 20s
timeout: 5s
retries: 3
backend-mongo: # Mongo
image: mongo:4-bionic
restart: unless-stopped
logging:
driver: none
volumes:
- database_vol:/data/db
ports:
- "27017:27017"
healthcheck:
test: ["CMD","nc","-z","localhost","27017"]
interval: 20s
timeout: 5s
retries: 3
volumes:
database_vol: