Setup Keycloak
This commit is contained in:
1
coreos-config/compose/01_keycloak/.env
Normal file
1
coreos-config/compose/01_keycloak/.env
Normal file
@ -0,0 +1 @@
|
||||
COMPOSE_PROJECT_NAME=keycloak
|
53
coreos-config/compose/01_keycloak/docker-compose.yaml
Normal file
53
coreos-config/compose/01_keycloak/docker-compose.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
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"
|
||||
- "com.centurylinklabs.watchtower.scope=update"
|
||||
restart: always
|
||||
networks:
|
||||
- backend
|
||||
- gateway
|
||||
|
||||
networks:
|
||||
backend:
|
||||
internal: true
|
||||
gateway:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
...
|
Reference in New Issue
Block a user