Rebrand to volundr; add deploy artifacts

- User-facing brand "bike-admin" -> "volundr" (page titles, top bar,
  login header, FastAPI title, README/AGENTS). Directory, remote,
  BIKE_ADMIN_* env prefix and bike_admin.db filename are unchanged.
- Add deploy/: systemd unit (bike-admin.service) and a production
  .env template (env.production.example).
This commit is contained in:
2026-09-10 11:29:49 +01:00
parent 12494bf30c
commit 2d63006bdc
12 changed files with 64 additions and 12 deletions
+27
View File
@@ -0,0 +1,27 @@
[Unit]
Description=volundr (bike service-due + MOT/insurance tracker)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=bike
Group=bike
WorkingDirectory=/opt/bike_admin
# Leading `-` = optional: the app still boots (and prompts for a password)
# if the .env has not been created yet.
EnvironmentFile=-/opt/bike_admin/.env
ExecStart=/opt/bike_admin/.venv/bin/uvicorn app.main:app \
--host 0.0.0.0 --port 8000 \
--forwarded-allow-ips 192.168.0.0/16 --proxy-headers
Restart=on-failure
RestartSec=2
# Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
ReadWritePaths=/opt/bike_admin/data
[Install]
WantedBy=multi-user.target
+25
View File
@@ -0,0 +1,25 @@
# bike_admin production environment (copied to /opt/bike_admin/.env on the server)
# All values are BIKE_ADMIN_-prefixed. This file is NOT committed (see .gitignore).
# --- Required -------------------------------------------------
BIKE_ADMIN_USERNAME=jake
BIKE_ADMIN_PASSWORD=change-me-to-something-strong
# --- Required in production -----------------------------------
# Secret used to derive the CSRF / session tokens. Generate with:
# python3 -c "import secrets;print(secrets.token_urlsafe(32))"
BIKE_ADMIN_SECRET_KEY=
# Adds the Secure flag to the session cookie (we're served over HTTPS via Caddy).
BIKE_ADMIN_IS_PRODUCTION=true
# Bind to all interfaces so the hermodr reverse proxy (on another host) can reach it.
# The app trusts X-Forwarded-* headers from the proxy (BIKE_ADMIN_TRUST_PROXY defaults true).
BIKE_ADMIN_BIND_HOST=0.0.0.0
BIKE_ADMIN_BIND_PORT=8000
# --- Optional fine-tuning (defaults shown) ---------------------
# BIKE_ADMIN_SERVICE_DUE_SOON_MILES=200 # service "book soon" lead time
# BIKE_ADMIN_RENEWAL_DUE_SOON_DAYS=60 # MOT/insurance "due soon" lead time
# BIKE_ADMIN_RENEWAL_MONTHS=12 # MOT/insurance validity (months)
# BIKE_ADMIN_DATA_DIR=/opt/bike_admin/data