45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
# {{ 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:
|
|
- {{ docker_keycloak_data_dir }}/{{ docker_keycloak_service_id }}/postgres:/var/lib/postgresql/data
|
|
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
default:
|
|
internal: true
|