Add Caddy for automatic HTTPS in front of the frontend/backend stack
Caddy now owns ports 80/443 and reverse-proxies to the frontend container (which was publishing 80 itself, conflicting with Caddy), handling Let's Encrypt certificate issuance/renewal automatically. Fix the Caddyfile's upstream name (it referenced a nonexistent "app" service instead of "frontend") and update the Lightsail deploy guide's HTTPS section to match this setup instead of the old manual-certbot approach.
This commit is contained in:
@@ -20,9 +20,24 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
depends_on:
|
||||
- frontend
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
backend_knowledge_base:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
|
||||
Reference in New Issue
Block a user