-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
133 lines (126 loc) · 4.36 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: '3'
volumes:
postgres_data:
driver: local
networks:
mynet:
driver: bridge
services:
test:
image: curlimages/curl:7.77.0
networks:
- mynet
hostname: test
entrypoint: /test/test-script.sh
# entrypoint: tail -f /dev/null
volumes:
- ./single_auth_request.sh:/test/single_auth_request.sh
- ./test-script.sh:/test/test-script.sh
depends_on:
- haproxy
haproxy:
image: haproxy:2.3
networks:
- mynet
hostname: haproxy
volumes:
- "./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg"
ports:
- "8080:80"
- "8404:8404"
- "9999:9999"
depends_on:
keycloak1:
condition: service_healthy
keycloak2:
condition: service_healthy
postgres:
image: postgres
networks:
- mynet
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak1:
image: jboss/keycloak:13.0.1
# image: jboss/keycloak:12.0.4
networks:
- mynet
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd
KEYCLOAK_STATISTICS: all
CACHE_OWNERS_COUNT: 2
KEYCLOAK_IMPORT: /opt/jboss/tools/testRealm.json
# JAVA_OPTS_APPEND: "-XX:+UnlockExperimentalVMOptions -XX:+UseZGC"
# JAVA_OPTS_APPEND: "-XX:+UseConcMarkSweepGC"
# JAVA_OPTS_APPEND: "-Xmx256m"
JAVA_OPTS_APPEND: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8787"
entrypoint: /opt/jboss/tools/extended-docker-entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9990"]
interval: 30s
timeout: 5s
retries: 5
ports:
- 8081:8080
- 9991:9990
- 8787:8787
volumes:
- ./keycloak/docker-entrypoint.sh:/opt/jboss/tools/extended-docker-entrypoint.sh
- ./keycloak/configure-caches.cli:/opt/jboss/startup-scripts/configure-caches.cli
- ./keycloak/configure-cache-owners.cli:/opt/jboss/startup-scripts/configure-cache-owners.cli
- ./keycloak/configure-logging.cli:/opt/jboss/startup-scripts/configure-logging.cli
# - ./keycloak/configure-cache-lifespan.cli:/opt/jboss/startup-scripts/configure-cache-lifespan.cli
- ./keycloak/testRealm.json:/opt/jboss/tools/testRealm.json
- ./jmx-client:/copy
depends_on:
- postgres
keycloak2:
image: jboss/keycloak:13.0.1
# image: jboss/keycloak:12.0.4
networks:
- mynet
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd
KEYCLOAK_STATISTICS: all
CACHE_OWNERS_COUNT: 2
# JAVA_OPTS_APPEND: "-XX:+UnlockExperimentalVMOptions -XX:+UseZGC"
# JAVA_OPTS_APPEND: "-XX:+UseConcMarkSweepGC"
# JAVA_OPTS_APPEND: "-Xmx256m"
JAVA_OPTS_APPEND: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8787"
entrypoint: /opt/jboss/tools/extended-docker-entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9990"]
interval: 30s
timeout: 5s
retries: 5
ports:
- 8082:8080
- 9992:9990
- 8788:8787
volumes:
- ./keycloak/docker-entrypoint.sh:/opt/jboss/tools/extended-docker-entrypoint.sh
- ./keycloak/configure-caches.cli:/opt/jboss/startup-scripts/configure-caches.cli
- ./keycloak/configure-cache-owners.cli:/opt/jboss/startup-scripts/configure-cache-owners.cli
- ./keycloak/configure-logging.cli:/opt/jboss/startup-scripts/configure-logging.cli
# - ./keycloak/configure-cache-lifespan.cli:/opt/jboss/startup-scripts/configure-cache-lifespan.cli
depends_on:
keycloak1:
condition: service_healthy