-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
33 lines (33 loc) · 1016 Bytes
/
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
version: "3.8"
services:
front-v2:
image: xfenix/xfenix-ru-front-v2:latest
ports:
- 80:80
- 443:443
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- challenge_mount:/var/www/certbot
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot:v2.7.0
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- challenge_mount:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot certonly -d xfenix.ru --non-interactive --agree-tos --webroot --webroot-path /var/www/certbot/; sleep 12h & wait $${!}; done;'"
back:
image: xfenix/xfenix-ru-back:latest
env_file: .env
volumes:
- /srv/www/xfenix-v2.ru/:/var/lib/xfenix.ru
deploy:
replicas: 2
restart_policy:
condition: on-failure
max_attempts: 5
volumes:
challenge_mount: