sessions/compose.yaml
agent b55ea07c96 Run sessions-web behind Authelia, configured only by env vars
Drop the app's own login (password hash, signed cookies, CSRF tokens, rate
limiting): Authelia via Caddy forward_auth is the login. The app refuses any
request without the Remote-User header (optionally limited to
SESSIONS_ALLOWED_USERS) and any cross-site POST (Sec-Fetch-Site / Origin).

The SSH key and the dev box host key now come from environment variables
printed by `sessions-ctl keygen`, so the container needs no secrets store or
mounts. Add compose.yaml so prod's panel can build and deploy it; remove the
Quadlet unit and the files it needed. README covers the panel deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KKYfRST9cTJYae3f7Jf3ac
2026-09-30 14:39:56 +00:00

20 lines
710 B
YAML

# Deployed on prod by the panel (reudy-net/panel): it builds this, injects the
# app's environment variables, and publishes web:8470 on 127.0.0.1 for the
# route, which must have Authelia turned on. The variables come from running
# `sessions-ctl keygen` on the dev box — see README "Deploy on prod".
services:
web:
build: ./web
image: localhost/sessions-web:latest
restart: unless-stopped
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8470/healthz', timeout=4)"]
interval: 60s
timeout: 5s