.. | ||
builder.sh | ||
cache-persistent.xml | ||
Dockerfile | ||
README.md |
thetadev256/keycloak
Optimized keycloak image with Postgres support and persistent cache (Sessions are preserved between restarts).
Original image source: https://quay.io/repository/keycloak/keycloak?tab=tags&tag=latest
Example docker-compose
Keycloak behind Traefik reverse proxy
version: "3"
services:
keycloak:
image: thetadev256/keycloak:latest
restart: unless-stopped
volumes:
- keycloak-cache:/opt/keycloak/cache
networks:
- proxy
environment:
- KC_HOSTNAME=auth.example.com
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://postgres/keycloak
- KC_DB_USERNAME=postgres
- KC_DB_PASSWORD=secret
- KC_HTTP_ENABLED=true
- KC_PROXY=edge
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=change_me
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.keycloak.entrypoints=websecure"
- "traefik.http.routers.keycloak.rule=Host(`auth.example.com`)"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
command: ["start"]
networks:
proxy:
external: true
volumes:
keycloak-cache:
Original documentation
Configuration options: https://www.keycloak.org/server/all-config
About the dockerfile: https://www.keycloak.org/server/containers