-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
104 lines (98 loc) · 2.71 KB
/
docker-compose.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
services:
db:
image: postgres:15-alpine
volumes:
- keycloak-db:/var/lib/postgresql/data
- ./docker-test-config/db-init:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=secret
- POSTGRES_MULTIPLE_DATABASES=synapse,keycloak
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U root -d keycloak'"]
interval: 10s
timeout: 3s
retries: 3
keycloak:
build:
context: .
pull_policy: build
ports:
- "8080:8080"
- "8443:8443"
environment:
- KC_HOSTNAME=idp.local
- KC_VENDOR=postgres
- KC_DB=postgres
- KC_DB_URL_HOST=db
- KC_DB_USERNAME=root
- KC_DB_SCHEMA=public
- KC_DB_URL_DATABASE=keycloak
- KC_DB_PASSWORD=secret
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KEYCLOAK_LOGLEVEL=INFO
volumes:
- ./docker-test-config/kc-conf/certificate.pem:/opt/keycloak/certificate.pem:ro
- ./docker-test-config/kc-conf/privatekey.pem:/opt/keycloak/privatekey.pem:ro
- ./docker-test-config/eimis-realm.json:/opt/keycloak/data/import/eimis-realm.json:ro
command:
- start
- --optimized
- --import-realm
- --https-certificate-file=/opt/keycloak/certificate.pem
- --https-certificate-key-file=/opt/keycloak/privatekey.pem
depends_on:
db:
condition: service_healthy
develop:
watch:
- action: rebuild
path: ./
keycloak-health:
image: curlimages/curl:8.5.0
command: ["sh", "-c", "while true; do sleep 1; done"]
healthcheck:
test:
[
"CMD-SHELL",
"curl --head -fsS --insecure --http1.1 https://keycloak:8443/health/ready",
]
interval: 15s
timeout: 30s
retries: 5
start_period: 30s
mailhog:
image: mailhog/mailhog
logging:
driver: "none" # disable saving logs
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui
synapse:
image: eimisans/synapse:latest
ports:
- "8008:8008"
volumes:
- ./docker-test-config/mx-data:/data
- ./docker-test-config/mx-conf:/mx-conf/
- ./docker-test-config/kc-conf/certificate.pem:/mx-conf/cert/certificate.pem:ro
depends_on:
keycloak-health:
condition: service_healthy
db:
condition: service_healthy
environment:
- SYNAPSE_CONFIG_PATH=/mx-conf/homeserver.yaml
- SSL_CERT_FILE=/mx-conf/cert/certificate.pem
element:
container_name: element-local
image: vectorim/element-web:v1.11.31
ports:
- "1983:80"
volumes:
- ./docker-test-config/element-config.json:/app/config.json
volumes:
keycloak-db: