-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose-theme-development.yaml
73 lines (69 loc) · 2.19 KB
/
docker-compose-theme-development.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
# An experimental docker-compose file to simplify theme development.
# Use this to deploy a database and the keycloak image: -
#
# docker compose -f docker-compose-theme-development.yaml build
# docker compose -f docker-compose-theme-development.yaml up -d
#
# 'keycloak.local' is the hostname used by the keycloak image
# so make sure your '/etc/hosts' file has an entry to allow routing
# to your local docker engine, typically: -
#
# 127.0.0.1 keycloak.local
#
# You can then navigate to keycloak at http://keycloak.local:8080
# where you should be able to login as 'admin' with the password 'blob111'.
#
# The project 'themes' directory is mounted into the container
# at '/opt/keycloak/themes'. This allows you to develop themes
# and modify the theme from outside the container and see the
# result without having to rebuild the container.
#
# The database is mounted into the local directory './data'.
# To reset the database shutdown the service and remove the data directory: -
#
# docker compose -f docker-compose-theme-development.yaml down
# rm -rf data
services:
# Our keycloak container image expects a PostgreSQL database
# with a database called 'keycloak' and a 'keycloak' user.
database:
image: postgres:15.10-alpine
container_name: database
volumes:
- ./data/postgresql/data:/var/lib/postgresql/data
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: blob888
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
healthcheck:
test: pg_isready -U postgres -d keycloak
interval: 10s
timeout: 2s
retries: 5
start_period: 10s
keycloak:
image: informaticsmatters/keycloak:${KC_IMAGE_TAG:-latest}
command: >
--spi-theme-static-max-age=-1
--spi-theme-cache-themes=false
--spi-theme-cache-templates=false
container_name: keycloak
volumes:
- ./themes:/opt/keycloak/themes
build:
context: .
dockerfile: Dockerfile
environment:
KEYCLOAK_ADMIN_PASSWORD: blob111
KC_DB_PASSWORD: blob888
KC_HOSTNAME: keycloak.local
ports:
- "8080:8080"
- "8443:8443"
- "9000:9000"
depends_on:
database:
condition: service_healthy