Skip to content

Commit

Permalink
Add https xforwar to keycloak
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Aug 16, 2024
1 parent fe47f27 commit 6bb1be4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
1 change: 1 addition & 0 deletions services/backend/services/keycloak/.compose.https.yaml
16 changes: 16 additions & 0 deletions services/backend/services/keycloak/compose.base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
keycloak:
image: quay.io/keycloak/keycloak:25.0
command: start-dev --import-realm --http-port=80
env_file: ./config/.env
volumes:
- ./healthcheck/healthcheck.sh:/healthcheck.sh
- ./config/facility-realm.json:/opt/keycloak/data/import/facility-realm.json:ro
labels:
- traefik.http.services.keycloak.loadbalancer.server.port=80
healthcheck:
test: bash /healthcheck.sh
start_period: 5s
interval: 30s
timeout: 10s
retries: 5
6 changes: 6 additions & 0 deletions services/backend/services/keycloak/compose.https.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
keycloak:
env_file:
- ./config/.https.env
labels:
- traefik.http.services.keycloak.loadbalancer.passhostheader=true
20 changes: 4 additions & 16 deletions services/backend/services/keycloak/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
services:
keycloak:
image: quay.io/keycloak/keycloak:25.0
command: start-dev --import-realm --http-port=80
env_file: ./config/.env
volumes:
- ./healthcheck/healthcheck.sh:/healthcheck.sh
- ./config/facility-realm.json:/opt/keycloak/data/import/facility-realm.json:ro
labels:
- traefik.http.services.keycloak.loadbalancer.server.port=80
healthcheck:
test: bash /healthcheck.sh
start_period: 5s
interval: 30s
timeout: 10s
retries: 5
include:
- path:
- compose.base.yaml
- .${KEYCLOAK_HTTPS_URL:+/}compose.https.yaml
2 changes: 2 additions & 0 deletions services/backend/services/keycloak/config/.https.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KC_PROXY_HEADERS=xforwarded
PROXY_ADDRESS_FORWARDING=true

0 comments on commit 6bb1be4

Please sign in to comment.