Skip to content

Commit 090a417

Browse files
committed
Docker updates due to Spring 3.x (environment variables upper case)
1 parent 8ee75d6 commit 090a417

File tree

3 files changed

+29
-32
lines changed

3 files changed

+29
-32
lines changed

Dockerfile.integrationtest

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
------------------------------------------------------------------------------
21
FROM eclipse-temurin:25-jdk
32

43
# Run commands as user 'olog'

docker-compose-integrationtest.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Use the default network olog_default.
2-
version: "3.7"
32
services:
43
olog:
54
build:
@@ -9,24 +8,18 @@ services:
98
- "8080:8080"
109
- "8181:8181"
1110
depends_on:
12-
- mongo
13-
- elastic
14-
# Ensure that the elastic server is up before starting olog.
11+
mongo:
12+
condition: service_started
13+
elastic:
14+
condition: service_healthy
1515
environment:
16-
ldap.enabled: "false"
17-
embedded_ldap.enabled: "false"
18-
demo_auth.enabled: "true"
19-
skipITCoverage: "true"
20-
mongo.host: mongo
21-
elasticsearch.network.host: elastic
16+
AUTHENTICATIONPROVIDERS: embeddedLdap
17+
SKIPITCOVERAGE: "true"
18+
MONGO_HOST: mongo
19+
ELASTICSEARCH_NETWORK_HOST: elasticsearch
2220
command: >
2321
/bin/bash -c "
24-
while ! curl -s -f elastic:9200/_cluster/health?wait_for_status=yellow;
25-
do
26-
echo Waiting for Elasticsearch;
27-
sleep 1;
28-
done;
29-
if [ ${skipITCoverage} == false ]; then
22+
if [ ${SKIPITCOVERAGE} == false ]; then
3023
export JAVA_TOOL_OPTIONS=-javaagent:/olog-target/jacocoagent.jar=destfile=/olog-target/jacoco.exec,output=file,append=false
3124
fi
3225
java -jar /olog-target/service-olog*.jar --spring.config.name=application-docker
@@ -48,6 +41,8 @@ services:
4841
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
4942
xpack.security.enabled: "false"
5043
xpack.security.http.ssl.enabled: "false"
44+
hostname:
45+
elasticsearch
5146
ports:
5247
- 9200:9200
5348
volumes:
@@ -56,6 +51,11 @@ services:
5651
memlock:
5752
soft: -1
5853
hard: -1
54+
healthcheck:
55+
test: curl -f http://elasticsearch:9200/_cluster/health
56+
interval: 5s
57+
timeout: 60s
58+
retries: 10
5959

6060
# Configure persistent storage for mongo and elastic.
6161
volumes:

docker-compose.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
# Use the default network olog_default.
2-
version: "3.7"
32
services:
43
olog:
54
build: .
65
ports:
76
- "8080:8080"
87
- "8181:8181"
98
depends_on:
10-
- mongo
11-
- elastic
9+
mongo:
10+
condition: service_started
11+
elastic:
12+
condition: service_healthy
1213
environment:
13-
mongo.host: mongo
14-
elasticsearch.network.host: elastic
15-
# Ensure that the elastic server is up before starting olog.
16-
command: >
17-
/bin/bash -c "
18-
while ! curl -s -f elastic:9200/_cluster/health?wait_for_status=yellow;
19-
do
20-
echo Waiting for Elasticsearch;
21-
sleep 1;
22-
done;
23-
java -jar service-olog-*.jar --spring.config.name=application-docker
24-
"
14+
MONGO_HOST: mongo
15+
ELASTICSEARCH_NETWORK_HOST: elasticsearch
2516

2617
mongo:
2718
image: mongo
@@ -39,6 +30,8 @@ services:
3930
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
4031
xpack.security.enabled: "false"
4132
xpack.security.http.ssl.enabled: "false"
33+
hostname:
34+
elasticsearch
4235
ports:
4336
- 9200:9200
4437
volumes:
@@ -47,6 +40,11 @@ services:
4740
memlock:
4841
soft: -1
4942
hard: -1
43+
healthcheck:
44+
test: curl -f http://elasticsearch:9200/_cluster/health
45+
interval: 5s
46+
timeout: 60s
47+
retries: 10
5048

5149
# Configure persistent storage for mongo and elastic.
5250
volumes:

0 commit comments

Comments
 (0)