-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (182 loc) · 5.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
191 lines (182 loc) · 5.49 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
---
services:
app:
build: .
depends_on:
solr:
condition: service_healthy
spatial:
condition: service_started
geoserver:
condition: service_healthy
geoserver-secure:
condition: service_healthy
keycloak-config:
condition: service_completed_successfully
command:
- tail
- -f
- /dev/null
environment:
CI: "${CI:-false}" # set to 'true' to mimic GitHub Actions
GEOSERVER_ROOT: data/geoserver/
GEOSERVER_SECURE_URL: http://admin:geoserver@geoserver-secure:8080/geoserver/rest/
GEOSERVER_URL: http://admin:geoserver@geoserver:8080/geoserver/rest/
SOLR_URL: http://solr:8983/solr/geodata-test
SPATIAL_ROOT: data/spatial/
SPATIAL_URL: http://spatial
restart: no
volumes:
- ./:/opt/app
solr:
command: >
bash -c 'echo geodata geodata-test | xargs -n1 precreate-core && solr-foreground'
image: solr:8.11.2
ports:
- 8983:8983
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/"]
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
volumes:
- ./solr:/opt/solr/server/solr/configsets:ro
spatial:
image: httpd:2.4
ports:
- 80:80
volumes:
- ./data/spatial:/usr/local/apache2/htdocs/:ro
geoserver:
image: docker.osgeo.org/geoserver:2.28-latest
ports:
- 8080:8080
environment: &geoserver-environment
ROOT_WEBAPP_REDIRECT: "true"
SKIP_DEMO_DATA: "true"
INSTALL_EXTENSIONS: "true"
COMMUNITY_EXTENSIONS: "sec-oidc"
PROXY_BASE_URL:
depends_on:
keycloak-config:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/geoserver/web/"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
extra_hosts:
- keycloak.localhost:host-gateway
volumes:
# Uncomment and comment out the geoserver-config service to persist geoserver between runs.
# - ./data/geoserver/geoserver_data:/opt/geoserver_data
- ./data/geoserver/public:/srv/geofiles
geoserver-secure:
image: docker.osgeo.org/geoserver:2.28-latest
ports:
- 8081:8080
environment: *geoserver-environment
depends_on:
keycloak-config:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/geoserver/web/"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
extra_hosts:
- keycloak.localhost:host-gateway
volumes:
- ./data/geoserver/UCB:/srv/geofiles
geoserver-config:
image: curlimages/curl:latest
depends_on:
geoserver:
condition: service_healthy
geoserver-secure:
condition: service_healthy
entrypoint: ["/bin/sh"]
command: ["/scripts/geoserver-oidc-config.sh"]
environment:
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET}
OIDC_SECURE_CLIENT_ID: ${OIDC_SECURE_CLIENT_ID}
OIDC_SECURE_CLIENT_SECRET: ${OIDC_SECURE_CLIENT_SECRET}
restart: on-failure:3
volumes:
- ./bin/geoserver-oidc-config.sh:/scripts/geoserver-oidc-config.sh:ro
postgres:
image: postgres:18-alpine
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
healthcheck:
test: ["CMD-SHELL", "pg_isready -U keycloak -d keycloak"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql
keycloak:
command: start-dev
depends_on:
postgres:
condition: service_healthy
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_HOSTNAME: "http://keycloak.localhost:8180"
KC_HOSTNAME_STRICT: "false"
KC_HOSTNAME_BACKCHANNEL_DYNAMIC: "true"
KC_HTTP_ENABLED: "true"
KC_HTTP_PORT: "8180"
KC_HEALTH_ENABLED: "true"
KC_LOG_LEVEL: ${KC_LOG_LEVEL:-INFO}
healthcheck:
# curl/wget are not present in the UBI9-based Keycloak image; use /dev/tcp.
# KC_HEALTH_ENABLED=true exposes /health/ready on the management port (9000).
test:
[
"CMD-SHELL",
"exec 3<>/dev/tcp/localhost/9000 && printf 'GET /health/ready HTTP/1.0\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && grep -q 'status.*UP' <&3",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
image: quay.io/keycloak/keycloak:26.1
ports:
- 127.0.0.1:8180:8180
restart: always
keycloak-config:
depends_on:
keycloak:
condition: service_healthy
environment:
KEYCLOAK_URL: http://keycloak:8180
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_AVAILABILITYCHECK_ENABLED: "true"
IMPORT_FILES_LOCATIONS: /config/*
IMPORT_VAR_SUBSTITUTION_ENABLED: "true"
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET}
OIDC_SECURE_CLIENT_ID: ${OIDC_SECURE_CLIENT_ID}
OIDC_SECURE_CLIENT_SECRET: ${OIDC_SECURE_CLIENT_SECRET}
OIDC_ADMIN_GROUP: ${OIDC_ADMIN_GROUP}
OIDC_USER_GROUP: ${OIDC_USER_GROUP}
image: adorsys/keycloak-config-cli:latest-26.1.0
restart: on-failure:3
volumes:
- ./data/geoserver/keycloak/config:/config
volumes:
postgres_data: