feat: add Caddy reverse proxy in front of app
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 11s

Caddy listens on port 80 and proxies to the app on 8000 internally.
App port is no longer exposed to the host directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 15:49:01 -05:00
parent bae0bc9dee
commit cea1b4e80e
2 changed files with 20 additions and 2 deletions

3
Caddyfile Normal file
View File

@@ -0,0 +1,3 @@
:80 {
reverse_proxy app:8000
}

View File

@@ -1,9 +1,22 @@
services:
caddy:
image: caddy:2-alpine
container_name: sneakyswole-proxy
ports:
- "80:80"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
depends_on:
app:
condition: service_healthy
restart: unless-stopped
app:
image: git.sneakygeek.net/sneakygeek/sneakyswole:latest
container_name: sneakyswole
ports:
- "${APP_PORT:-8000}:8000"
expose:
- "8000"
volumes:
- sneakyswole-data:/app/data
env_file:
@@ -19,3 +32,5 @@ services:
volumes:
sneakyswole-data:
driver: local
caddy-data:
driver: local