Replace SWAG with Nginx and CertBot
This commit is contained in:
@@ -1,32 +1,28 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
swag:
|
nginx:
|
||||||
image: lscr.io/linuxserver/swag
|
image: nginx
|
||||||
container_name: swag
|
container_name: nginx
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
cap_add:
|
command: nginx -c /config/nginx.conf
|
||||||
- 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
|
|
||||||
volumes:
|
volumes:
|
||||||
- '/home/nick/configs/routing/swag:/config'
|
- /home/nick/configs/routing/nginx:/config
|
||||||
- '/mnt/storage:/static:ro'
|
- /mnt/storage:/static:ro
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
|
||||||
- 80:80
|
- 80:80
|
||||||
|
- 443:443
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- 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:
|
cloudflare_argo_tunnel:
|
||||||
image: cloudflare/cloudflared
|
image: cloudflare/cloudflared
|
||||||
container_name: cloudflared
|
container_name: cloudflared
|
||||||
@@ -35,7 +31,7 @@ services:
|
|||||||
- '/home/nick/configs/routing/cloudflared:/etc/cloudflared'
|
- '/home/nick/configs/routing/cloudflared:/etc/cloudflared'
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- 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'
|
user: '1000:1000'
|
||||||
|
|
||||||
cloudflare_ddns:
|
cloudflare_ddns:
|
||||||
|
Reference in New Issue
Block a user