Skip to content

Commit

Permalink
Make keycloak setup more consistent
Browse files Browse the repository at this point in the history
Giving operator control of restart by using unless-stopped. Previously
it was in two extremes at the same time: The db would always restart, even if stopped,
while the app server would never restart, even if it was running.

Also opting into a feature that's necessary to properly configure token exchange
according to Keycloak docs at https://www.keycloak.org/securing-apps/token-exchange
(While the docs say it's not needed for the internal to internal flow, I literally couldn't
follow the instructions without this feature).
  • Loading branch information
NobodysNightmare committed Dec 10, 2024
1 parent f48be19 commit ed22f53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/dev/keycloak/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.9"
services:
db-keycloak:
image: postgres:13
restart: always
restart: unless-stopped
networks:
- external
environment:
Expand All @@ -14,7 +14,7 @@ services:
keycloak:
image: quay.io/keycloak/keycloak:21.1
command: ["start-dev", "--proxy edge", "--spi-connections-http-client-default-disable-trust-manager=true"]
restart: no
restart: unless-stopped
networks:
- external
extra_hosts:
Expand All @@ -28,7 +28,7 @@ services:
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB_SCHEMA=public
- KC_HOSTNAME=keycloak.local
- KC_FEATURES=token-exchange
- KC_FEATURES=token-exchange,admin-fine-grained-authz
- KC_TRANSACTION_XA_ENABLED=false
volumes:
- /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
Expand Down

0 comments on commit ed22f53

Please sign in to comment.