Files
CRAPP/infra/supabase/docker/docker-compose.caddy.yml
T
davide f496eb2f88 Aggiungo stack Supabase self-hosted e config di produzione
Stack Docker completo in infra/supabase/docker/ (vendored da supabase/supabase)
per svincolare dev e produzione da Lovable Cloud. Include override di
produzione che non espone porte pubblicamente e disattiva i servizi non
usati da CrAPP (Realtime, Storage, imgproxy, Edge Functions, pooler),
un Caddyfile con routing /api/* per un solo dominio, e i template .env
per app e stack. Forzo inoltre il preset Nitro a node-server in
vite.config.ts, dato che il default sarebbe Cloudflare Workers.
2026-08-28 14:23:20 +02:00

43 lines
1.1 KiB
YAML

services:
# Caddy terminates TLS and forwards to the API gateway (api-gw) on port 8000,
# so the gateway's own host port binding is removed here. This works for
# either gateway, since the service is named api-gw in both cases.
api-gw:
ports: !reset []
# When using the Kong override uncomment the following:
#environment:
# KONG_PORT_MAPS: "443:8000,443:8443"
caddy:
container_name: supabase-caddy
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
depends_on:
api-gw:
condition: service_healthy
studio:
condition: service_healthy
environment:
PROXY_DOMAIN: ${PROXY_DOMAIN}
PROXY_AUTH_USERNAME: ${DASHBOARD_USERNAME}
PROXY_AUTH_PASSWORD: ${DASHBOARD_PASSWORD}
command:
- /bin/sh
- -c
- |
PROXY_AUTH_PASSWORD=$$(caddy hash-password --plaintext "$$PROXY_AUTH_PASSWORD") && \
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
volumes:
- ./volumes/proxy/caddy:/etc/caddy
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config: