37 lines
974 B
YAML
37 lines
974 B
YAML
version: '3'
|
|
|
|
volumes:
|
|
nginx_conf:
|
|
driver_opts:
|
|
type: nfs
|
|
o: addr=dockerstorage,nfsvers=4
|
|
device: :/swarm/stacks/reverseproxy/nginx
|
|
certbot_conf:
|
|
driver_opts:
|
|
type: nfs
|
|
o: addr=dockerstorage,nfsvers=4
|
|
device: :/swarm/stacks/reverseproxy/certbot_conf
|
|
certificates:
|
|
external: true
|
|
|
|
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.15-alpine
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- nginx_conf:/etc/nginx/conf.d
|
|
- certbot_conf:/etc/letsencrypt
|
|
- ./data/certbot/www:/var/www/certbot
|
|
certbot:
|
|
image: certbot/certbot:arm64v8-v1.32.2
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
|
volumes:
|
|
- certbot_conf:/etc/letsencrypt
|
|
# - certificates:/etc/letsencrypt/live
|
|
- ./data/certbot/www:/var/www/certbot
|