first commit - working on the reverse proxy

This commit is contained in:
2023-01-21 19:33:14 +00:00
commit 22e6a432ad
7 changed files with 276 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
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