2022-11-26 08:52:41 +00:00
|
|
|
---
|
2021-10-07 11:20:30 +00:00
|
|
|
- name: setup keycloak containers for sso.data.coop
|
2022-11-26 08:52:41 +00:00
|
|
|
community.docker.docker_compose:
|
|
|
|
project_name: keycloak
|
|
|
|
pull: true
|
2021-10-07 11:20:30 +00:00
|
|
|
definition:
|
2022-11-26 08:52:41 +00:00
|
|
|
version: '3.6'
|
2021-10-07 11:20:30 +00:00
|
|
|
services:
|
|
|
|
|
|
|
|
postgres:
|
2022-11-26 08:52:41 +00:00
|
|
|
image: postgres:10
|
|
|
|
restart: unless-stopped
|
2021-10-07 11:20:30 +00:00
|
|
|
networks:
|
2022-11-26 08:52:41 +00:00
|
|
|
- keycloak
|
2021-10-07 11:20:30 +00:00
|
|
|
volumes:
|
2022-11-26 08:52:41 +00:00
|
|
|
- '{{ services.keycloak.volume_folder }}/data:/var/lib/postgresql/data'
|
2021-10-07 11:20:30 +00:00
|
|
|
environment:
|
2022-11-26 08:52:41 +00:00
|
|
|
POSTGRES_USER: keycloak
|
|
|
|
POSTGRES_PASSWORD: '{{ postgres_passwords.keycloak }}'
|
|
|
|
POSTGRES_DB: keycloak
|
2021-10-07 11:20:30 +00:00
|
|
|
|
|
|
|
app:
|
2022-11-26 08:52:41 +00:00
|
|
|
image: quay.io/keycloak/keycloak:{{ services.keycloak.version }}
|
|
|
|
restart: unless-stopped
|
2021-10-07 11:20:30 +00:00
|
|
|
networks:
|
2022-11-26 08:52:41 +00:00
|
|
|
- keycloak
|
|
|
|
- postfix
|
|
|
|
- external_services
|
|
|
|
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:52:41 +00:00
|
|
|
VIRTUAL_HOST: '{{ services.keycloak.domain }}'
|
|
|
|
VIRTUAL_PORT: '8080'
|
|
|
|
LETSENCRYPT_HOST: '{{ services.keycloak.domain }}'
|
|
|
|
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
|