The admin was a set of env credentials on its own loopback listener. That bought network isolation, and charged a second port to tunnel and proxy and a second credential in the password manager. It also sat outside the SameSite protection the member cookie already had, and left every ban and password reset with no actor to log. is_admin on users reuses what was already there: the session, the login rate limiter, ban-drops-sessions, CSRF. /admin is now a route on the member mux. A member without the flag gets 404 rather than 403 — the pages are none of their business, and "forbidden" confirms there is something to be forbidden from. Registration needs an invite and invites come from /admin, so an empty database cannot grow its first user. seedAdmin breaks that circle exactly once, from ADMIN_EMAIL and ADMIN_PASSWORD, and does nothing against a database that already has users. An admin cannot ban themselves: banning drops the target's sessions, and nothing would be left that could undo it. This reverses decision 8, which is rewritten rather than deleted, along with the admin entry in the CONTEXT.md vocabulary.
21 lines
605 B
YAML
21 lines
605 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
args:
|
|
VERSION: ${VERSION:-dev}
|
|
environment:
|
|
# Only used to create the first account on an empty database; inert after that.
|
|
ADMIN_EMAIL: ${ADMIN_EMAIL:-}
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
|
|
ADMIN_NAME: ${ADMIN_NAME:-Ylläpito}
|
|
ADDR: ":8080"
|
|
SECURE_COOKIES: ${SECURE_COOKIES:-true}
|
|
PUBLIC_URL: ${PUBLIC_URL:-}
|
|
# The SQLite file sits in here beside the audio, so this one mount is the whole backup.
|
|
volumes:
|
|
- ./storage:/storage
|
|
ports:
|
|
- "8080:8080"
|
|
restart: unless-stopped
|