From 3ea02bab3c0af9d5b0c1bd1a75876b099cff8073 Mon Sep 17 00:00:00 2001 From: Kroonk Date: Thu, 21 May 2026 10:55:48 +0200 Subject: [PATCH] feat: add SSO environment variables to docker-compose.yml and create .env.example --- .env.example | 21 +++++++++++++++++++++ docker-compose.yml | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6729d05 --- /dev/null +++ b/.env.example @@ -0,0 +1,21 @@ +# JWT Secret used for admin/user authentication tokens (change this to a secure random value) +JWT_SECRET=your_jwt_secret_here + +# SQLite Database path inside container (normally persistent volume, no need to change) +# FULLS_DIR=/app/public/images/fulls +# THUMBS_DIR=/app/public/images/thumbs + +# ========================================== +# Keycloak SSO (OIDC) Configuration +# ========================================== +# Base Keycloak URL Realm Authority +SSO_AUTHORITY=https://auth.mischlabs.de/realms/mischlabs + +# Client ID configured in Keycloak for Photography +SSO_CLIENT_ID=pocketbase + +# Client Secret retrieved from Keycloak (Credentials tab) +SSO_CLIENT_SECRET= + +# Public callback URI registered in Keycloak for the Photography app +SSO_REDIRECT_URI=https://tom.mischlabs.de/api/auth/sso/callback diff --git a/docker-compose.yml b/docker-compose.yml index 922915f..025cb72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,10 @@ services: - JWT_SECRET=${JWT_SECRET:?set JWT_SECRET in your environment} - FULLS_DIR=/app/public/images/fulls - THUMBS_DIR=/app/public/images/thumbs + - SSO_AUTHORITY=${SSO_AUTHORITY:-https://auth.mischlabs.de/realms/mischlabs} + - SSO_CLIENT_ID=${SSO_CLIENT_ID:-pocketbase} + - SSO_CLIENT_SECRET=${SSO_CLIENT_SECRET:-} + - SSO_REDIRECT_URI=${SSO_REDIRECT_URI:-https://tom.mischlabs.de/api/auth/sso/callback} volumes: # Nextcloud-Ordner mit Originalbildern (read-only) - /volume1/nextcloud/data/Tom/files/Websitebilder:/app/public/images/fulls:ro