datacoop.ansible/roles/docker/tasks/services/keycloak.yml

43 lines
1.4 KiB
YAML
Raw Normal View History

# 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:
- "{{ 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:
image: "quay.io/keycloak/keycloak:{{ services.keycloak.version }}"
2021-10-07 11:20:30 +00:00
restart: "unless-stopped"
networks:
- "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:
VIRTUAL_HOST: "{{ services.keycloak.domain }}"
2021-10-07 11:20:30 +00:00
VIRTUAL_PORT: "8080"
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