-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (39 loc) · 1.09 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
version: '3.1'
services:
nginx:
image: nginx:latest
network_mode: host
volumes:
- ./nginx/node.conf:/etc/nginx/conf.d/node.template:ro
- ./logs:/var/log/nginx
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
restart: always
command: 'bash -c "cat /etc/nginx/conf.d/node.template > /etc/nginx/conf.d/default.conf && nginx -g ''daemon off;''"'
node:
image: node:lts
network_mode: host
user: node
working_dir: /home/node
environment:
- NODE_ENV=production
volumes:
- ./app:/home/node/app:ro
- ./logs:/home/node/logs:rw
restart: always
command: 'node app/server.js'
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_SCHEDULE: 0 0 4 * * *
TZ: Europe/Brussels
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_DEBUG: "true"