feat: Configure Keycloak to use internal port 8081, explicitly define OIDC endpoints in NextAuth, and update API service Keycloak authority.
This commit is contained in:
+6
-4
@@ -42,8 +42,9 @@ services:
|
||||
KC_HOSTNAME: "http://localhost:8080"
|
||||
KC_HOSTNAME_STRICT: "false"
|
||||
KC_PROXY: "edge"
|
||||
KC_HTTP_PORT: "8081"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8080:8081"
|
||||
volumes:
|
||||
- ./infra/keycloak:/opt/keycloak/data/import
|
||||
depends_on:
|
||||
@@ -62,20 +63,21 @@ services:
|
||||
container_name: workclub_api
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Development
|
||||
ASPNETCORE_URLS: "http://+:8080"
|
||||
ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=workclub;Username=workclub;Password=dev_password_change_in_production"
|
||||
Keycloak__Authority: "http://keycloak:8080/realms/workclub"
|
||||
Keycloak__Authority: "http://192.168.65.254:8080/realms/workclub"
|
||||
Keycloak__Audience: "workclub-api"
|
||||
Keycloak__TokenValidationParameters__ValidateIssuer: "false"
|
||||
ports:
|
||||
- "5001:8080"
|
||||
extra_hosts:
|
||||
- "localhost:host-gateway"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./backend:/app:cached
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: watch run WorkClub.Api/WorkClub.Api.csproj
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
@@ -95,7 +97,7 @@ services:
|
||||
KEYCLOAK_CLIENT_ID: "workclub-app"
|
||||
KEYCLOAK_CLIENT_SECRET: "dev-secret-workclub-api-change-in-production"
|
||||
KEYCLOAK_ISSUER: "http://localhost:8080/realms/workclub"
|
||||
KEYCLOAK_ISSUER_INTERNAL: "http://keycloak:8080/realms/workclub"
|
||||
KEYCLOAK_ISSUER_INTERNAL: "http://keycloak:8081/realms/workclub"
|
||||
NEXT_PUBLIC_KEYCLOAK_ISSUER: "http://localhost:8080/realms/workclub"
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
Reference in New Issue
Block a user