Files
lmnp-organizer/compose.yml
T
nessar bbe8916e82 feat: rework OIDC to BFF (Backend-For-Frontend) cookie-session pattern
- backend: switch from OAuth2 Resource Server to OAuth2 Client (spring-boot-starter-oauth2-client)
- backend: configure Spring Security oauth2Login() with session cookie (JSESSIONID HttpOnly)
- backend: add UserController exposing /api/user to report authenticated user info
- backend: configure GET /logout with RP-initiated end-session support
- backend: update HelloController to use @AuthenticationPrincipal OAuth2User
- backend: update all tests to use .with(oidcLogin()) mock
- backend: explicitly configure OIDC provider endpoints to bypass discovery at test time
- frontend: remove angular-oauth2-oidc and @ngx-env/builder dependencies
- frontend: revert angular.json builders to standard @angular/build:*
- frontend: replace client-side OIDC flow with /api/user check + window.location redirects
- frontend: update app.config.ts and config.service.ts to remove OIDC configuration
- frontend: rewrite all unit tests to mock /api/user endpoint instead of OAuthService
- compose: move OIDC_CLIENT_ID and OIDC_CLIENT_SECRET to backend environment variables
- compose/dockerfile: remove frontend build-time OIDC ARG/ENV secrets
2026-08-17 14:18:14 +02:00

51 lines
1.2 KiB
YAML

services:
mongodb:
image: mongo:8.0
container_name: lmnp-mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: adminpassword
volumes:
- mongodb_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--username", "admin", "--password", "adminpassword", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 5
# - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: lmnp-backend
ports:
- "8080:8080"
environment:
SPRING_DATA_MONGODB_URI: mongodb://admin:adminpassword@mongodb:27017/lmnp?authSource=admin
OIDC_ISSUER_URI: ${OIDC_ISSUER_URI:-http://localhost:8090/realms/voidAuth}
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID:-lmnp-client}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:-lmnp-secret}
depends_on:
mongodb:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: lmnp-frontend
ports:
- "80:80"
depends_on:
- backend
volumes:
mongodb_data:
networks:
default:
name: lmnp-net