Jeremy Stanley f477e35561 Upgrade to Keycloak 23.0
This includes a switch from the "legacy" style Wildfly-based image
to a new setup using Quarkus.

Because Keycloak maintainers consider H2 databases as a test/dev
only option, there are no good migration and upgrade paths short of
export/import data. Go ahead and change our deployment model to rely
on a proper RDBMS, run locally from a container on the same server.

Change-Id: I01f8045563e9f6db6168b92c5a868b8095c0d97b
2024-02-06 05:33:37 +00:00

50 lines
1.4 KiB
Django/Jinja

# Version 2 is the latest that is supported by docker-compose in
# Ubuntu Xenial.
version: '2'
services:
mariadb:
# 10.11 was synonymous with the "lts" tag when we brought up the service
image: docker.io/library/mariadb:10.11
network_mode: host
restart: always
environment:
MARIADB_ROOT_PASSWORD: "{{ keycloak_root_db_password }}"
MARIADB_DATABASE: keycloak
MARIADB_USER: keycloak
MARIADB_PASSWORD: "{{ keycloak_db_password }}"
volumes:
- /var/lib/keycloak/db:/var/lib/mysql
- /var/lib/keycloak/99-bind-address.cnf:/etc/mysql/conf.d/99-bind-address.cnf:ro
logging:
driver: syslog
options:
tag: docker-mariadb
keycloak:
depends_on:
- mariadb
image: quay.io/keycloak/keycloak:23.0
network_mode: host
restart: always
environment:
KC_DB_PASSWORD: "{{ keycloak_db_password }}"
KC_DB_USERNAME: keycloak
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: "{{ keycloak_admin_password }}"
command:
- 'start'
- '--hostname-strict=false'
- '--http-enabled=true'
- '--http-host=::1'
- '--proxy=edge'
- '--db=mariadb'
# Wrap the DB host address here because it ends up inserted into a
# colon-delimited JDBC URL internally.
- '--db-url-host=[::1]'
- '--db-url-port=3306'
- '--db-url-database=keycloak'
logging:
driver: syslog
options:
tag: docker-keycloak