2022-10-12 15:31:44 -07:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
keycloak:
|
|
|
|
image: quay.io/keycloak/keycloak:latest
|
|
|
|
container_name: keycloak_keycloak
|
|
|
|
logging:
|
|
|
|
driver: loki
|
|
|
|
options:
|
|
|
|
loki-url: http://localhost:3100/loki/api/v1/push
|
|
|
|
loki-batch-size: "50"
|
|
|
|
loki-retries: "1"
|
|
|
|
loki-timeout: "2s"
|
|
|
|
keep-file: "true"
|
2022-10-17 08:59:51 -07:00
|
|
|
volumes:
|
|
|
|
- $KEYCLOAK_DATA:/opt/keycloak/data
|
2022-10-12 15:31:44 -07:00
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
aliases:
|
|
|
|
- keycloak
|
|
|
|
restart: "no"
|
2022-10-12 16:21:07 -07:00
|
|
|
command: start-dev --hostname-url=https://keycloak.jafner.net --proxy=passthrough
|
2022-10-17 10:03:05 -07:00
|
|
|
environment:
|
|
|
|
- KEYCLOAK_ADMIN=$KEYCLOAK_ADMIN
|
|
|
|
- KEYCLOAK_ADMIN_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD
|
2022-10-12 15:31:44 -07:00
|
|
|
labels:
|
|
|
|
traefik.http.routers.keycloak.rule: Host(`keycloak.jafner.net`)
|
|
|
|
traefik.http.routers.keycloak.tls.certresolver: lets-encrypt
|
2022-10-17 09:57:02 -07:00
|
|
|
traefik.http.routers.keycloak.middlewares: lan-only@file
|
2022-10-12 16:09:53 -07:00
|
|
|
traefik.http.services.keycloak.loadbalancer.server.port: 8080
|
2022-10-17 08:44:09 -07:00
|
|
|
|
|
|
|
forwardauth:
|
2022-10-17 09:34:22 -07:00
|
|
|
image: mesosphere/traefik-forward-auth:3.1.0
|
2022-10-17 08:44:09 -07:00
|
|
|
container_name: keycloak_forwardauth
|
|
|
|
logging:
|
|
|
|
driver: loki
|
|
|
|
options:
|
|
|
|
loki-url: http://localhost:3100/loki/api/v1/push
|
|
|
|
loki-batch-size: "50"
|
|
|
|
loki-retries: "1"
|
|
|
|
loki-timeout: "2s"
|
|
|
|
keep-file: "true"
|
|
|
|
networks:
|
|
|
|
web:
|
2022-10-17 10:09:11 -07:00
|
|
|
aliases:
|
|
|
|
- forwardauth
|
2022-10-17 08:44:09 -07:00
|
|
|
restart: "no"
|
2022-10-17 10:03:05 -07:00
|
|
|
environment:
|
|
|
|
- SECRET=$SECRET
|
|
|
|
- ENCRYPTION_KEY=$ENCRYPTION_KEY
|
|
|
|
- PROVIDER_URI=$PROVIDER_URI
|
|
|
|
- CLIENT_ID=$CLIENT_ID
|
|
|
|
- CLIENT_SECRET=$CLIENT_SECRET
|
|
|
|
- LOG_LEVEL=$LOG_LEVEL
|
2022-10-17 08:44:09 -07:00
|
|
|
labels:
|
2022-10-17 09:57:02 -07:00
|
|
|
#- "traefik.enable=true"
|
|
|
|
#- "traefik.docker.network=web"
|
|
|
|
#- "traefik.http.services.forwardauth.loadbalancer.server.port=4181"
|
|
|
|
#- "traefik.http.routers.forwardauth.entrypoints=websecure"
|
2022-10-17 08:44:09 -07:00
|
|
|
- "traefik.http.routers.forwardauth.rule=Path(`/_oauth`)"
|
2022-10-17 10:12:15 -07:00
|
|
|
#- "traefik.http.routers.forwardauth.middlewares=traefik-forward-auth"
|
2022-10-17 08:44:09 -07:00
|
|
|
- "traefik.http.routers.forwardauth.tls.certresolver=lets-encrypt"
|
2022-10-17 10:12:15 -07:00
|
|
|
#- "traefik.http.middlewares.traefik-forward-auth.forwardauth.address=http://forwardauth:4181"
|
|
|
|
#- "traefik.http.middlewares.traefik-forward-auth.forwardauth.authResponseHeaders=X-Forwarded-User"
|
|
|
|
#- "traefik.http.middlewares.traefik-forward-auth.forwardauth.trustForwardHeader=true"
|
2022-10-12 15:31:44 -07:00
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
external: true
|