All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
# docker-compose-keycloak.yml
|
|
# ============================================
|
|
# Keycloak integration test environment.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.yml -f docker-compose-keycloak.yml up
|
|
#
|
|
# This extends the base docker-compose.yml to add:
|
|
# - Keycloak IdP with a pre-configured "armature" realm
|
|
# - Armature configured with AUTH_MODE=oidc pointing at Keycloak
|
|
#
|
|
# After startup:
|
|
# Armature: http://localhost:3000
|
|
# Keycloak: http://localhost:8180 (admin / admin)
|
|
#
|
|
# Pre-configured test users in Keycloak:
|
|
# alice / alice123 (role: user, groups: [engineering])
|
|
# bob / bob123 (role: admin, groups: [engineering, leads])
|
|
#
|
|
# The realm is imported from ci/keycloak-realm.json on first startup.
|
|
# ============================================
|
|
|
|
services:
|
|
# Override armature to use OIDC
|
|
armature:
|
|
environment:
|
|
AUTH_MODE: oidc
|
|
OIDC_ISSUER_URL: http://keycloak:8080/realms/armature
|
|
OIDC_EXTERNAL_ISSUER_URL: http://localhost:8180/realms/armature
|
|
OIDC_CLIENT_ID: armature
|
|
OIDC_CLIENT_SECRET: armature-secret
|
|
OIDC_REDIRECT_URL: http://localhost:3000/api/v1/auth/oidc/callback
|
|
OIDC_AUTO_ACTIVATE: "true"
|
|
OIDC_ADMIN_ROLE: sb-admin
|
|
depends_on:
|
|
keycloak:
|
|
condition: service_healthy
|
|
|
|
keycloak:
|
|
image: quay.io/keycloak/keycloak:26.0
|
|
container_name: armature-keycloak
|
|
command:
|
|
- start-dev
|
|
- --import-realm
|
|
environment:
|
|
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
|
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
|
|
KC_HTTP_PORT: "8080"
|
|
KC_HEALTH_ENABLED: "true"
|
|
volumes:
|
|
- ./ci/keycloak-realm.json:/opt/keycloak/data/import/armature-realm.json:ro
|
|
ports:
|
|
- "8180:8080"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "cat < /dev/null > /dev/tcp/localhost/9000"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 15
|
|
start_period: 30s
|