feat(deploy): docker-compose.traefik.yml overlay per behind-Traefik
Per VPS condiviso (es. con Gitea) dove Traefik gestisce già 80/443.
- gateway/Caddyfile: env-aware listen + auto_https + trusted_proxies
(defaults invariati per modalità standalone).
- docker-compose.traefik.yml: overlay che rimuove ports binding host,
attacca gateway alla network esterna di Traefik, set labels per
routing Host(cerbero-mcp.tielogic.xyz) + TLS via certresolver
Traefik. Caddy ascolta plain HTTP :80 interno.
- scripts/deploy.sh: rileva BEHIND_TRAEFIK=true → aggiunge -f
docker-compose.traefik.yml a tutti i docker compose call.
- DEPLOYMENT.md: nuova sezione 2a (topologia standalone vs behind-traefik)
+ sotto-sezione modalità behind-Traefik con env vars richieste.
Uso:
docker compose -f docker-compose.prod.yml -f docker-compose.traefik.yml \
--env-file .env up -d
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -1,12 +1,19 @@
|
||||
{
|
||||
admin off
|
||||
email {$ACME_EMAIL:adrianodalpastro@tielogic.com}
|
||||
auto_https {$AUTO_HTTPS:on}
|
||||
|
||||
# Plugin mholt/caddy-ratelimit
|
||||
order rate_limit before basicauth
|
||||
|
||||
# Trusted proxies: rispetta X-Forwarded-For quando dietro reverse proxy
|
||||
# (es. Traefik). Default = solo private ranges.
|
||||
servers {
|
||||
trusted_proxies static {$TRUSTED_PROXIES:private_ranges}
|
||||
}
|
||||
}
|
||||
|
||||
cerbero-mcp.tielogic.xyz {
|
||||
{$LISTEN:cerbero-mcp.tielogic.xyz} {
|
||||
log {
|
||||
output stdout
|
||||
format json
|
||||
|
||||
Reference in New Issue
Block a user