2022-04-28 17:40:43 +02:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
version: '3.1'
|
|
|
|
|
|
|
|
services:
|
|
|
|
keycloak:
|
|
|
|
image: docker.io/bitnami/keycloak:16
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
KEYCLOAK_DATABASE_HOST: "db"
|
|
|
|
KEYCLOAK_DATABASE_PORT: "5432"
|
|
|
|
KEYCLOAK_DATABASE_NAME: "{{ docker_keycloak_db_name }}"
|
|
|
|
KEYCLOAK_DATABASE_USER: "{{ docker_keycloak_db_user }}"
|
|
|
|
KEYCLOAK_DATABASE_PASSWORD: "{{ docker_keycloak_db_password }}"
|
|
|
|
KEYCLOAK_DATABASE_SCHEMA: "public"
|
|
|
|
KEYCLOAK_PROXY_ADDRESS_FORWARDING: "true"
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=traefik"
|
|
|
|
- "traefik.http.routers.{{ docker_keycloak_service_id }}.entrypoints=web"
|
|
|
|
- "traefik.http.routers.{{ docker_keycloak_service_id }}.rule=Host(`{{ docker_keycloak_fqdn }}`)"
|
|
|
|
- "traefik.http.services.{{ docker_keycloak_service_id }}.loadbalancer.server.port=8080"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- traefik
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres:13
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: "{{ docker_keycloak_db_name }}"
|
|
|
|
POSTGRES_USER: "{{ docker_keycloak_db_user }}"
|
|
|
|
POSTGRES_PASSWORD: "{{ docker_keycloak_db_password }}"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
volumes:
|
2022-04-29 17:16:16 +02:00
|
|
|
- {{ docker_keycloak_data_dir }}/{{ docker_keycloak_service_id }}/postgres:/var/lib/postgresql/data
|
2022-04-28 17:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
default:
|
|
|
|
internal: true
|