-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-services.yaml
More file actions
47 lines (45 loc) · 1.44 KB
/
docker-compose-services.yaml
File metadata and controls
47 lines (45 loc) · 1.44 KB
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
services:
postgres14:
image: postgres:14-alpine
restart: always
container_name: postgres14
volumes:
- postgres14-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=risnorms
- POSTGRES_PASSWORD=test
- POSTGRES_USER=test
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d risnorms"]
interval: 5s
retries: 3
start_period: 5s
timeout: 3s
keycloak:
image: quay.io/keycloak/keycloak:26.4.5
command: ["start-dev", "--import-realm"]
container_name: keycloak
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: test
KC_HEALTH_ENABLED: true
KC_METRICS_ENABLED: true
KC_HTTP_PORT: 8443
KC_HOSTNAME_URL: http://localhost:8443/keycloak
ports:
- "8443:8443"
volumes:
- ./local/keycloak/realm.json:/opt/keycloak/data/import/realm.json:ro
healthcheck:
test:
[
"CMD-SHELL",
'[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URL(args[0]).openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:9000/health/live',
]
interval: 5s
timeout: 5s
retries: 20
volumes:
postgres14-data: