Keycloak docker config
Closed this issue · 1 comments
LeonMusCoden commented
Hello,
the plugin is working great, but I'm having issues with setting up keycloak. Specifically, I'm having this issue: Admin console not loading and hostname related issues #14666.
I have tried a lot of things mentioned in that issue and elsewhere, but can't find a fix. Am I missing anything?
keycloak:
image: quay.io/keycloak/keycloak:latest
container_name: keycloak
command: start --hostname-debug=true
user: 1000:1000
environment:
KC_HOSTNAME_URL: https://auth.domain.com
KC_HOSTNAME_ADMIN_URL: https://auth.domain.com
KC_PROXY: edge
KC_ADMIN: admin
KC_ADMIN_PASSWORD: admin_password
volumes:
- ./keycloak:/opt/keycloak/data
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.keycloak.rule=Host(`auth.domain.com`)"
- "traefik.http.routers.keycloak.entrypoints=websecure"
- "traefik.http.routers.keycloak.tls.certresolver=myresolver"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
# Redirect '/' to '/admin'
- "traefik.http.middlewares.custom-redirect.redirectregex.regex=^https:\\/\\/([^\\/]+)\\/?$$"
- "traefik.http.middlewares.custom-redirect.redirectregex.replacement=https://$$1/admin"
- "traefik.http.routers.keycloak.middlewares=default@file,custom-redirect"
- "com.centurylinklabs.watchtower.enable=true"
networks:
- web
depends_on:
- traefik
LeonMusCoden commented
It turns out I had a middleware defined with some default http headers. One of those caused the error. I assume it has to do with the framdeDeny option.