2022-12-28 16:17:32 +00:00
|
|
|
# vim: ft=yaml.ansible
|
|
|
|
---
|
2021-10-07 11:20:30 +00:00
|
|
|
- name: setup keycloak containers for sso.data.coop
|
|
|
|
docker_compose:
|
|
|
|
project_name: "keycloak"
|
|
|
|
pull: "yes"
|
|
|
|
definition:
|
|
|
|
version: "3.6"
|
|
|
|
services:
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: "postgres:10"
|
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "keycloak"
|
|
|
|
volumes:
|
2022-11-26 08:15:18 +00:00
|
|
|
- "{{ services.keycloak.volume_folder }}/data:/var/lib/postgresql/data"
|
2021-10-07 11:20:30 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: "keycloak"
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.keycloak }}"
|
|
|
|
POSTGRES_DB: "keycloak"
|
|
|
|
|
|
|
|
app:
|
2022-11-26 08:15:18 +00:00
|
|
|
image: "quay.io/keycloak/keycloak:{{ services.keycloak.version }}"
|
2021-10-07 11:20:30 +00:00
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "keycloak"
|
|
|
|
- "postfix"
|
|
|
|
- "external_services"
|
2022-11-26 08:15:18 +00:00
|
|
|
command: "start --db=postgres --db-url=jdbc:postgresql://postgres:5432/keycloak --db-username=keycloak --db-password={{ postgres_passwords.keycloak }} --hostname={{ services.keycloak.domain }} --proxy=edge --https-port=8080 --http-relative-path=/auth"
|
2021-10-07 11:20:30 +00:00
|
|
|
environment:
|
2022-11-26 08:15:18 +00:00
|
|
|
VIRTUAL_HOST: "{{ services.keycloak.domain }}"
|
2021-10-07 11:20:30 +00:00
|
|
|
VIRTUAL_PORT: "8080"
|
2022-11-26 08:15:18 +00:00
|
|
|
LETSENCRYPT_HOST: "{{ services.keycloak.domain }}"
|
2021-10-07 11:20:30 +00:00
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
2022-11-22 21:37:58 +00:00
|
|
|
|
2021-10-07 11:20:30 +00:00
|
|
|
networks:
|
|
|
|
keycloak:
|
|
|
|
postfix:
|
|
|
|
external: true
|
|
|
|
external_services:
|
2022-11-10 18:32:39 +00:00
|
|
|
external: true
|