Fix deploy config to match the actual VPS (Caddy, not Traefik)

The server fronts everything with Caddy (container root-caddy-1), has no
Dockge and no Traefik, and keeps compose stacks in /docker — not
/opt/stacks. Every traefik.* label in this compose file was inert, so the
container would build and run while never being routed.

Join the external `web` network Caddy is on so it can reach the container
by name (info-share-spot:3000) and publish no host port. Routing now
lives in /root/Caddyfile on the server.

Rewrite DEPLOY.md against the real topology, including the Caddyfile
validate-before-reload step — a bad Caddyfile takes down every site on
the box, and Caddy serves a stale in-memory config until something
reloads it, which hides the breakage until the next restart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 09:15:40 -04:00
co-authored by Claude Opus 5
parent 9d7d18669d
commit 13fca11c81
2 changed files with 83 additions and 68 deletions
+15 -12
View File
@@ -1,9 +1,13 @@
# Deploy stack for the Hostinger VPS (Docker + Dockge + Traefik).
# Lives in Dockge's stacks dir (/docker/info-share-spot) so Dockge manages it.
# Deploy stack for the avriahost VPS (Docker + Caddy).
# Lives in /docker/info-share-spot.
#
# Traefik on this VPS runs in host-network mode with the Docker provider, so the
# app just needs traefik.enable + a router; no shared "traefik" network is needed.
# It's served at the VPS wildcard hostname with automatic Let's Encrypt HTTPS.
# This VPS fronts everything with Caddy (container `root-caddy-1`), NOT Traefik.
# Caddy holds :80/:443, terminates TLS with automatic Let's Encrypt, and routes
# by hostname from /root/Caddyfile. It shares the external `web` network with
# this app, so it reaches us as `info-share-spot:3000` — no published host port.
#
# Route lives in /root/Caddyfile:
# info-share-spot.srv1720881.hstgr.cloud { reverse_proxy info-share-spot:3000 }
services:
app:
@@ -22,10 +26,9 @@ services:
SUPABASE_PUBLISHABLE_KEY: ${SUPABASE_PUBLISHABLE_KEY}
HOST: 0.0.0.0
PORT: 3000
labels:
- traefik.enable=true
- traefik.http.routers.infoshare.rule=Host(`info-share-spot.srv1720881.hstgr.cloud`)
- traefik.http.routers.infoshare.entrypoints=websecure
- traefik.http.routers.infoshare.tls=true
- traefik.http.routers.infoshare.tls.certresolver=letsencrypt
- traefik.http.services.infoshare.loadbalancer.server.port=3000
networks:
- web
networks:
web:
external: true