fix: Moves back to old setup, watchtower setup wasn't working as expected.

This commit is contained in:
2025-04-04 10:09:37 -04:00
parent 1d1770d0a1
commit 48c02343aa
2 changed files with 58 additions and 77 deletions

View File

@@ -1,6 +1,7 @@
services:
caddy:
image: 127.0.0.1:3000/homelab/caddy:latest
build:
context: .
container_name: caddy
restart: unless-stopped
env_file:
@@ -16,31 +17,13 @@ services:
cap_add:
- NET_ADMIN
volumes:
- ./config:/etc/caddy
- caddy_data:/data
- caddy_config:/config
networks:
- proxy
security_opt:
- no-new-privileges:true
labels:
com.centurylinklabs.watchtower.enable: true
# This is primarily for pulling and restarting the primary caddy service
# because restarting caddy through webhooks spawned by komodo do not really
# work, because caddy is the gateway of communication with komodo, therefore
# when I tried webhooks it would pull the new data / configuration, stop the caddy service,
# and I would have to ssh into the server to restart caddy for changes to take effect.
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- backend
environment:
WATCTOWER_LABEL_ENABLE: true
WATCHTOWER_POLL_INTERVAL: 300 # 5 minutes
volumes:
caddy_data: {}
@@ -49,5 +32,3 @@ volumes:
networks:
proxy:
external: true
backend:
external: true