-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
42 lines (40 loc) · 941 Bytes
/
docker-compose.prod.yml
File metadata and controls
42 lines (40 loc) · 941 Bytes
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
services:
application:
build:
context: .
args:
- NODE_ENV=production
env_file:
- .env
- .prod.env
ports:
- "${APPLICATION_PORT}:${APPLICATION_PORT}"
depends_on:
- database
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "curl", "-f", "--max-time", "3", "http://localhost:${APPLICATION_PORT}/health"]
interval: 2m
timeout: 6s
retries: 3
start_period: 30s
command: ["npm", "run", "start"]
database:
image: mongo
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongodb_data:/data/db
env_file:
- .prod.env
logging:
driver: "none"
restart: always
volumes:
mongodb_data:
##avoided mongodb database password and username because of complexity, but might later can cause the security reasons