Replace SWAG with Nginx and CertBot

This commit is contained in:
2022-03-07 23:39:41 +00:00
parent 44806c1235
commit 2629060756

View File

@@ -1,32 +1,28 @@
version: '3.9'
services:
swag:
image: lscr.io/linuxserver/swag
container_name: swag
nginx:
image: nginx
container_name: nginx
restart: unless-stopped
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Athens
- URL=${DOMAIN}
- VALIDATION=dns
- SUBDOMAINS=wildcard
- DNSPLUGIN=cloudflare
- EMAIL=${EMAIL}
- ONLY_SUBDOMAINS=false
- STAGING=false
command: nginx -c /config/nginx.conf
volumes:
- '/home/nick/configs/routing/swag:/config'
- '/mnt/storage:/static:ro'
- /home/nick/configs/routing/nginx:/config
- /mnt/storage:/static:ro
ports:
- 443:443
- 80:80
- 443:443
networks:
- proxy
certbot:
image: certbot/dns-cloudflare
container_name: certbot
restart: unless-stopped
entrypoint: "/bin/sh -c \"trap exit TERM; while :; do certbot renew --post-hook 'chown -R 1000:1000 /etc/letsencrypt'; sleep 12h & wait $${!}; done;\""
volumes:
- /home/nick/configs/routing/nginx/certs/letsencrypt:/etc/letsencrypt
cloudflare_argo_tunnel:
image: cloudflare/cloudflared
container_name: cloudflared
@@ -35,7 +31,7 @@ services:
- '/home/nick/configs/routing/cloudflared:/etc/cloudflared'
networks:
- proxy
command: tunnel --no-autoupdate --no-tls-verify --origincert /etc/cloudflared/cert.pem --hostname ${DOMAIN} --origin-server-name *.${DOMAIN} --url https://swag:443
command: tunnel --no-autoupdate --no-tls-verify --origincert /etc/cloudflared/cert.pem --hostname ${DOMAIN} --origin-server-name *.${DOMAIN} --url https://nginx:443
user: '1000:1000'
cloudflare_ddns: