2022-10-12 15:31:44 -07:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
keycloak:
|
2024-01-04 11:58:13 -08:00
|
|
|
image: quay.io/keycloak/keycloak:19.0
|
2022-10-12 15:31:44 -07:00
|
|
|
container_name: keycloak_keycloak
|
2022-10-17 08:59:51 -07:00
|
|
|
volumes:
|
2024-01-04 11:58:13 -08:00
|
|
|
- $KEYCLOAK_DATA:/opt/keycloak/data
|
2022-10-12 15:31:44 -07:00
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
aliases:
|
|
|
|
- keycloak
|
|
|
|
restart: "no"
|
2024-01-04 11:58:13 -08:00
|
|
|
command: start-dev --hostname-url=https://keycloak.jafner.net --proxy=passthrough
|
2024-01-04 15:25:44 -08:00
|
|
|
healthcheck:
|
2024-01-04 15:29:51 -08:00
|
|
|
test: ["CMD", "curl", "-f", "http://0.0.0.0:8080"]
|
2024-01-04 15:31:41 -08:00
|
|
|
interval: 30s
|
2024-01-04 15:25:44 -08:00
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2022-11-01 00:33:30 -07:00
|
|
|
env_file:
|
|
|
|
- keycloak.env
|
|
|
|
- keycloak_secrets.env
|
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-23 18:33:44 -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
|
|
|
|
networks:
|
|
|
|
web:
|
2022-10-17 10:09:11 -07:00
|
|
|
aliases:
|
|
|
|
- forwardauth
|
2022-10-17 08:44:09 -07:00
|
|
|
restart: "no"
|
2023-04-06 12:37:10 -07:00
|
|
|
depends_on:
|
2024-01-04 15:34:58 -08:00
|
|
|
keycloak:
|
|
|
|
condition: service_healthy
|
2022-11-01 00:33:30 -07:00
|
|
|
env_file:
|
|
|
|
- forwardauth.env
|
|
|
|
- forwardauth_secrets.env
|
2022-10-17 08:44:09 -07:00
|
|
|
labels:
|
2022-11-01 01:00:18 -07:00
|
|
|
- "traefik.enable=false"
|
2022-10-17 08:44:09 -07:00
|
|
|
- "traefik.http.routers.forwardauth.rule=Path(`/_oauth`)"
|
|
|
|
- "traefik.http.routers.forwardauth.tls.certresolver=lets-encrypt"
|
2023-01-11 21:09:25 -08:00
|
|
|
|
|
|
|
forwardauth-privileged:
|
|
|
|
image: mesosphere/traefik-forward-auth:3.1.0
|
|
|
|
container_name: keycloak_forwardauth-privileged
|
2023-01-24 21:36:40 -08:00
|
|
|
command: "./traefik-forward-auth --whitelist=jafner425@gmail.com"
|
2023-01-11 21:09:25 -08:00
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
aliases:
|
2023-01-11 21:49:05 -08:00
|
|
|
- forwardauth-privileged
|
2023-01-11 21:09:25 -08:00
|
|
|
restart: "no"
|
2023-04-06 12:37:10 -07:00
|
|
|
depends_on:
|
2024-01-04 15:34:58 -08:00
|
|
|
keycloak:
|
|
|
|
condition: service_healthy
|
2023-01-11 21:09:25 -08:00
|
|
|
env_file:
|
2023-01-11 21:49:05 -08:00
|
|
|
- forwardauth-privileged.env
|
|
|
|
- forwardauth-privileged_secrets.env
|
2023-01-11 21:09:25 -08:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=false"
|
2023-01-11 21:56:25 -08:00
|
|
|
- "traefik.http.routers.forwardauth-privileged.rule=Path(`/_oauth`)"
|
2023-01-11 21:09:25 -08:00
|
|
|
- "traefik.http.routers.forwardauth-privileged.tls.certresolver=lets-encrypt"
|
2024-01-04 11:30:47 -08:00
|
|
|
|
2024-01-04 15:46:14 -08:00
|
|
|
keycloak-wip:
|
2024-01-05 17:42:09 -08:00
|
|
|
image: quay.io/keycloak/keycloak:23.0
|
2024-01-04 15:46:14 -08:00
|
|
|
container_name: keycloak_keycloak-wip
|
|
|
|
volumes:
|
|
|
|
- $KEYCLOAK_DATA/import:/opt/keycloak/data/import
|
|
|
|
networks:
|
2024-01-05 17:42:09 -08:00
|
|
|
keycloak:
|
|
|
|
aliases:
|
|
|
|
- keycloak-wip
|
2024-01-04 15:46:14 -08:00
|
|
|
web:
|
|
|
|
aliases:
|
2024-01-05 17:42:09 -08:00
|
|
|
- keycloak-wip
|
2024-01-04 15:46:14 -08:00
|
|
|
restart: "no"
|
2024-01-05 17:42:09 -08:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
2024-01-05 14:49:38 -08:00
|
|
|
command: start
|
2024-01-04 15:46:14 -08:00
|
|
|
env_file:
|
|
|
|
- keycloak-wip.env
|
|
|
|
- keycloak-wip_secrets.env
|
|
|
|
labels:
|
2024-01-05 17:42:09 -08:00
|
|
|
traefik.http.routers.keycloak-wip.rule: Host(`keycloak-wip.jafner.net`)
|
|
|
|
traefik.http.routers.keycloak-wip.tls.certresolver: lets-encrypt
|
|
|
|
traefik.http.routers.keycloak-wip.middlewares: keycloak-redirect
|
|
|
|
traefik.http.services.keycloak-wip.loadbalancer.server.port: 8080
|
|
|
|
traefik.http.middlewares.keycloak-redirect.redirectregex.regex: ^https:\\/\\/([^\\//]+)\\/?$$"
|
|
|
|
traefik.http.middlewares.keycloak-redirect.redirectregex.replacement: https://$$1/admin"
|
2024-01-04 15:46:14 -08:00
|
|
|
|
|
|
|
postgres:
|
2024-01-05 17:42:09 -08:00
|
|
|
image: postgres:15
|
2024-01-04 15:46:14 -08:00
|
|
|
container_name: keycloak_postgres
|
|
|
|
networks:
|
|
|
|
- keycloak
|
|
|
|
env_file:
|
2024-01-05 17:42:09 -08:00
|
|
|
- postgres.env
|
2024-01-04 15:46:14 -08:00
|
|
|
- postgres_secrets.env
|
|
|
|
volumes:
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
2022-10-12 15:31:44 -07:00
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
external: true
|
2024-01-04 15:46:14 -08:00
|
|
|
keycloak:
|
2024-01-04 11:32:56 -08:00
|
|
|
|
2024-01-04 15:46:14 -08:00
|
|
|
volumes:
|
|
|
|
postgres_data:
|