33 lines
826 B
YAML
33 lines
826 B
YAML
---
|
|
volumes:
|
|
nginx_conf:
|
|
driver: local
|
|
certbot_conf:
|
|
driver: local
|
|
certbot_www:
|
|
driver: local
|
|
|
|
networks:
|
|
pub_lb_net:
|
|
external: true
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.15-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/nginx:/etc/nginx/conf.d
|
|
- ./data/certbot/conf:/etc/letsencrypt
|
|
- ./data/certbot/www:/var/www/certbot
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
|
networks:
|
|
pub_lb_net:
|
|
ipv4_address: 10.99.81.241
|
|
certbot:
|
|
image: certbot/certbot
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/certbot/conf:/etc/letsencrypt
|
|
- ./data/certbot/www:/var/www/certbot
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|