Files
homebrewery-oidc/.env.example
T

75 lines
3.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Kopieren nach .env. Nur Entwicklungswerte – keine echten Secrets einchecken.
APP_PORT=8000
MONGODB_URI=mongodb://mongodb/homebrewery
MONGO_TAG=8
# Storage-Backend (ADR 0002, docs/storage/): mongo (Standard) oder postgres.
# Postgres: docker compose --profile postgres up --build homebrewery-pg
HB_DB_DRIVER=mongo
# HB_POSTGRES_URL=postgres://homebrewery:homebrewery-dev@postgres:5432/homebrewery
# HB_POSTGRES_POOL_MAX=10
# Profil postgres
POSTGRES_DB=homebrewery
POSTGRES_USER=homebrewery
POSTGRES_PASSWORD=homebrewery-dev
POSTGRES_PORT=5432
# Profil keycloak (Discovery: http://keycloak.localhost:8080/realms/homebrewery/.well-known/openid-configuration)
KEYCLOAK_TAG=26.4
KEYCLOAK_PORT=8080
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin-dev
# Profil authentik (Discovery: http://authentik.localhost:9000/application/o/homebrewery/.well-known/openid-configuration)
AUTHENTIK_TAG=2026.2
AUTHENTIK_PORT=9000
AUTHENTIK_SECRET_KEY=dev-only-insecure-secret-key-change-me
AUTHENTIK_DB_PASSWORD=authentik-dev
AUTHENTIK_BOOTSTRAP_PASSWORD=admin-dev
# --- Auth (ADR 0001, docs/auth/) ---------------------------------------------
# Ohne diese Werte verhält sich die App wie Upstream (nur naturalcrit-Login).
# Aktive Login-Methoden, kommagetrennt: oidc, naturalcrit.
# leer + HB_OIDC_ISSUER gesetzt -> oidc,naturalcrit (Auswahlseite /auth/login)
# leer ohne Issuer -> naturalcrit
# oidc -> nur OIDC (nc_session und /local/login gesperrt)
# naturalcrit -> nur Alt-Login (/auth/oidc/* gesperrt)
HB_AUTH_PROVIDERS=oidc
# Öffentliche URL der App, ohne Schrägstrich am Ende (Redirect-URI: <HB_PUBLIC_URL>/auth/oidc/callback)
HB_PUBLIC_URL=http://localhost:8000
# Mindestens 32 Byte, nur Umgebung. Erzeugen: openssl rand -base64 48
HB_SESSION_SECRET=dev-only-session-secret-change-me-0123456789
HB_SESSION_TTL=7d
# Aus Compose heraus: Keycloak (docker compose --profile keycloak up -d)
HB_OIDC_ISSUER=http://keycloak.localhost:8080/realms/homebrewery
# ... oder authentik (docker compose --profile authentik up -d)
# HB_OIDC_ISSUER=http://authentik.localhost:9000/application/o/homebrewery/
HB_OIDC_CLIENT_ID=homebrewery
HB_OIDC_CLIENT_SECRET=dev-only-client-secret
# Optional
# HB_OIDC_SCOPES=openid profile email
# HB_OIDC_USERNAME_CLAIM=preferred_username
# HB_OIDC_LINK_BY_EMAIL=false
# HB_OIDC_END_SESSION=false
# HB_OIDC_LABEL=Anmelden
# --- Git-Backend (ADR 0003, docs/git/) -----------------------------------------
# Brews in beliebigen Git-Repos speichern (HTTPS + Personal Access Token). Nur für OIDC-Konten.
# Ohne Schlüssel ist das Feature aus. Erzeugen: openssl rand -base64 32 (Schlüssel nie einchecken, nicht verlieren:
# ohne ihn sind gespeicherte Tokens unbrauchbar)
# HB_GIT_TOKEN_KEY=
# Alte Schlüssel (kommagetrennt) nur zum Entschlüsseln bei Rotation
# HB_GIT_TOKEN_KEYS_OLD=
# Empfohlen im Betrieb: nur diese Hosts (Wildcards wie *.example.org erlaubt)
# HB_GIT_ALLOWED_HOSTS=git.example.org,github.com
# Nur für Entwicklung: private Ziele (z. B. Gitea im Compose-Netz) und http:// erlauben
# HB_GIT_ALLOW_PRIVATE=false
# HB_GIT_ALLOW_HTTP=false
# HB_GIT_TIMEOUT_MS=20000
# HB_GIT_OPEN_TIMEOUT_MS=4000
# HB_GIT_MAX_FILE_BYTES=5242880
# HB_GIT_MAX_CONCURRENCY=2
# HB_GIT_COMMITTER_NAME=Homebrewery
# HB_GIT_COMMITTER_EMAIL=