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>
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
# Deploy stack for the avriahost VPS (Docker + Caddy).
|
|
# Lives in /docker/info-share-spot.
|
|
#
|
|
# 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:
|
|
build: .
|
|
image: info-share-spot:latest
|
|
container_name: info-share-spot
|
|
restart: unless-stopped
|
|
# Runtime secrets (SUPABASE_SERVICE_ROLE_KEY) live here — gitignored, not in the repo.
|
|
env_file:
|
|
- path: .env.secret
|
|
required: false
|
|
environment:
|
|
# SSR runtime vars (public-safe). Compose substitutes these from the .env
|
|
# file next to this compose file.
|
|
SUPABASE_URL: ${SUPABASE_URL}
|
|
SUPABASE_PUBLISHABLE_KEY: ${SUPABASE_PUBLISHABLE_KEY}
|
|
HOST: 0.0.0.0
|
|
PORT: 3000
|
|
networks:
|
|
- web
|
|
|
|
networks:
|
|
web:
|
|
external: true
|