fix(docker): Review-Findings PR #14 (README-CRLF, dockerignore, Keycloak-Scopes, einheitlicher Issuer, authentik-Blueprint-Abhängigkeiten)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dev-bot BotandClaude Sonnet 5.5 committed 2026-11-24 20:27:57 +00:00
1 parent 8f06133181
commit 7b159a0355
7 files changed
+45 -11

No files matched your search

+2 -2
View File
@@ -9,13 +9,13 @@ POSTGRES_USER=homebrewery
POSTGRES_PASSWORD=homebrewery-dev
POSTGRES_PORT=5432
# Profil keycloak (Discovery: http://localhost:8080/realms/homebrewery/.well-known/openid-configuration)
# 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://localhost:9000/application/o/homebrewery/.well-known/openid-configuration)
# 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
+1
View File
@@ -15,3 +15,4 @@ startMViewer.bat
.vscode
coverage
.env
+3 -3
View File
@@ -102,10 +102,10 @@ docker compose up --build # App + MongoDB -> http://localhost:8000
| Profil | Start | Ergebnis |
|---|---|---|
| `postgres` | `docker compose --profile postgres up -d postgres` | PostgreSQL 18 auf `127.0.0.1:5432` (ab M2) |
| `keycloak` | `docker compose --profile keycloak up -d` | Keycloak :8080, Realm `homebrewery`, Client `homebrewery`/`dev-only-client-secret`, Nutzer `testuser`/`testuser-dev`, Admin `admin`/`admin-dev`. Discovery: `http://localhost:8080/realms/homebrewery/.well-known/openid-configuration` (Start dauert 1–2 Min.) |
| `authentik` | `docker compose --profile authentik up -d` | authentik :9000, Provider/App `homebrewery` per Blueprint, gleicher Client und Nutzer, Admin `akadmin`/`admin-dev`. Discovery: `http://localhost:9000/application/o/homebrewery/.well-known/openid-configuration` |
| `keycloak` | `docker compose --profile keycloak up -d` | Keycloak :8080, Realm `homebrewery`, Client `homebrewery`/`dev-only-client-secret`, Nutzer `testuser`/`testuser-dev`, Admin `admin`/`admin-dev`. Discovery: `http://keycloak.localhost:8080/realms/homebrewery/.well-known/openid-configuration` (Start dauert 1–2 Min.) |
| `authentik` | `docker compose --profile authentik up -d` | authentik :9000, Provider/App `homebrewery` per Blueprint, gleicher Client und Nutzer, Admin `akadmin`/`admin-dev`. Discovery: `http://authentik.localhost:9000/application/o/homebrewery/.well-known/openid-configuration` |
Hinweise: Alle Zugangsdaten sind reine Dev-Werte, für den Betrieb in `.env` ersetzen. MongoDB 5+ benötigt eine CPU mit AVX; auf älteren CPUs/VMs `MONGO_TAG=4.4` setzen. Falls der authentik-Blueprint beim allerersten Start wegen noch laufender Standard-Blueprints fehlschlägt: `docker compose exec authentik ak apply_blueprint /blueprints/custom/homebrewery.yaml`.
Hinweise: Die IdPs laufen unter `keycloak.localhost:8080` bzw. `authentik.localhost:9000` (Issuer für Browser und App-Container identisch, Bindung nur an 127.0.0.1; `*.localhost` löst moderne Browser/OS automatisch auf, sonst `127.0.0.1 keycloak.localhost authentik.localhost` in `/etc/hosts`). Ports nur ändern, wenn Redirect-/Issuer-Einstellungen mitgezogen werden. Alle Zugangsdaten sind reine Dev-Werte, für den Betrieb in `.env` ersetzen. MongoDB 5+ benötigt eine CPU mit AVX; auf älteren CPUs/VMs `MONGO_TAG=4.4` setzen. Der authentik-Blueprint wird beim Erststart automatisch angewendet (dauert einige Minuten, bis die Discovery-URL 200 liefert).
### Running the application on FreeBSD or FreeNAS
+13 -4
View File
@@ -46,12 +46,16 @@ services:
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN:-admin}
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin-dev}
KC_HTTP_PORT: 8080
KC_HOSTNAME_STRICT: "false"
KC_HTTP_PORT: ${KEYCLOAK_PORT:-8080}
# Einheitlicher Issuer für Browser (Host) und App-Container: http://keycloak.localhost:8080
KC_HOSTNAME: http://keycloak.localhost:8080
volumes:
- ./docker/keycloak/realm-homebrewery.json:/opt/keycloak/data/import/realm-homebrewery.json:ro
ports:
- "${KEYCLOAK_PORT:-8080}:8080"
- "127.0.0.1:${KEYCLOAK_PORT:-8080}:${KEYCLOAK_PORT:-8080}"
networks:
default:
aliases: [keycloak.localhost]
# --- Profil: authentik (Test-IdP, per Blueprint vorkonfiguriert) ---
authentik-db:
@@ -81,10 +85,15 @@ services:
AUTHENTIK_BOOTSTRAP_PASSWORD: ${AUTHENTIK_BOOTSTRAP_PASSWORD:-admin-dev}
AUTHENTIK_BOOTSTRAP_EMAIL: admin@example.test
AUTHENTIK_ERROR_REPORTING__ENABLED: "false"
AUTHENTIK_LISTEN__HTTP: 0.0.0.0:${AUTHENTIK_PORT:-9000}
volumes:
- ./docker/authentik/blueprints:/blueprints/custom:ro
ports:
- "${AUTHENTIK_PORT:-9000}:9000"
- "127.0.0.1:${AUTHENTIK_PORT:-9000}:${AUTHENTIK_PORT:-9000}"
# Einheitlicher Issuer: http://authentik.localhost:9000 (Browser und App-Container)
networks:
default:
aliases: [authentik.localhost]
depends_on:
authentik-db:
condition: service_healthy
+10
View File
@@ -0,0 +1,10 @@
node_modules
npm-debug.log
.git
.env
.env.*
!.env.example
.npm-cache
.runtime-tmp
tests
docker-compose*.yml
@@ -2,6 +2,21 @@ version: 1
metadata:
name: Homebrewery Dev
entries:
- model: authentik_blueprints.metaapplyblueprint
attrs:
identifiers:
name: Default - Provider authorization flow (implicit consent)
required: true
- model: authentik_blueprints.metaapplyblueprint
attrs:
identifiers:
name: Default - Provider invalidation flow
required: true
- model: authentik_blueprints.metaapplyblueprint
attrs:
identifiers:
name: System - OAuth2 Provider - Scopes
required: true
- model: authentik_core.user
identifiers:
username: testuser
+1 -2
View File
@@ -16,8 +16,7 @@
"directAccessGrantsEnabled": false,
"redirectUris": ["http://localhost:8000/*", "http://homebrewery.local.naturalcrit.com:8000/*"],
"webOrigins": ["+"],
"attributes": { "pkce.code.challenge.method": "S256" },
"defaultClientScopes": ["openid", "profile", "email"]
"attributes": { "pkce.code.challenge.method": "S256", "post.logout.redirect.uris": "+" }
}
],
"users": [