-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml.template
71 lines (70 loc) · 1.71 KB
/
docker-compose.yml.template
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
67
68
69
70
71
services:
nginx:
image: nginx:1
container_name: trackx-nginx
network_mode: 'host'
cap_drop:
- ALL
cap_add:
- CHOWN
- SETUID
- SETGID
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /var/cache/nginx:rw,noexec,nodev,nosuid,size=56m
- /var/run:rw,noexec,nodev,nosuid,size=64k
volumes:
- type: bind
source: /opt/trackx/etc/nginx
target: /etc/nginx
read_only: true
- type: bind
source: /opt/trackx/var/dash
target: /var/www/dashtrackxapp/html
read_only: true
- type: bind
source: /opt/trackx/var/dash/errors
target: /var/www/apitrackxapp/html
read_only: true
stop_grace_period: 30s
restart: always
healthcheck:
test: ['CMD', 'service', 'nginx', 'status']
interval: 5m
timeout: 3s
retries: 3
start_period: 10s
api:
build:
context: ./packages/trackx-api/dist
dockerfile: ../Dockerfile
image: trackx-api
depends_on:
- nginx
container_name: trackx-api
network_mode: 'host'
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp:rw,noexec,nodev,nosuid,size=28m
environment:
NODE_ENV: production
CONFIG_PATH: /data/trackx.config.js
volumes:
- type: bind
source: /opt/trackx/var/db
target: /data/db
- type: bind
source: /opt/trackx/etc/trackx.config.js
target: /data/trackx.config.js
read_only: true
stop_grace_period: 40s
restart: always
healthcheck:
test: ['CMD', '/usr/bin/node', 'check.js', 'http://127.0.0.1:8000/health']
interval: 1m30s
timeout: 4s
retries: 3
start_period: 30s