53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
|
---
|
||
|
version: '3.9'
|
||
|
|
||
|
services:
|
||
|
postgres:
|
||
|
image: postgres:14
|
||
|
restart: always
|
||
|
environment:
|
||
|
- "POSTGRES_DB={{ auth.db.name }}"
|
||
|
- "POSTGRES_USER={{ auth.db.user }}"
|
||
|
- "POSTGRES_PASSWORD={{ auth.db.password }}"
|
||
|
labels:
|
||
|
- "com.centurylinklabs.watchtower.scope=update"
|
||
|
volumes:
|
||
|
- pg_data:/var/lib/postgresql/data
|
||
|
networks:
|
||
|
- backend
|
||
|
|
||
|
keycloak:
|
||
|
image: quay.io/keycloak/keycloak:19.0.0
|
||
|
command: start
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
environment:
|
||
|
- "KC_DB=postgres"
|
||
|
- "KC_DB_URL_HOST=postgres"
|
||
|
- "KC_DB_URL_DATABASE={{ auth.db.name }}"
|
||
|
- "KC_DB_USERNAME={{ auth.db.user }}"
|
||
|
- "KC_DB_PASSWORD={{ auth.db.password }}"
|
||
|
- "KEYCLOAK_ADMIN={{ auth.keycloak.user }}"
|
||
|
- "KEYCLOAK_ADMIN_PASSWORD={{ auth.keycloak.password }}"
|
||
|
- "KC_PROXY=edge"
|
||
|
- "KC_HOSTNAME=auth.tobiasmanske.de"
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.http.routers.keycloak.rule=Host(`auth.tobiasmanske.de`)"
|
||
|
- "traefik.http.routers.keycloak.entryPoints=websecure"
|
||
|
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||
|
restart: always
|
||
|
networks:
|
||
|
- backend
|
||
|
- gateway
|
||
|
|
||
|
networks:
|
||
|
backend:
|
||
|
internal: true
|
||
|
gateway:
|
||
|
external: true
|
||
|
|
||
|
volumes:
|
||
|
pg_data:
|
||
|
...
|