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
This commit is contained in:
parent
ca66db3aeb
commit
b55ea07c96
9 changed files with 254 additions and 332 deletions
20
compose.yaml
Normal file
20
compose.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue