Skip to content

Commit 5a6ef94

Browse files
committed
Drop auxiliary *wait services in docker compose, use --wait instead.
1 parent c83c5e8 commit 5a6ef94

File tree

3 files changed

+2
-36
lines changed

3 files changed

+2
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Features:
2121
## One-Stop Shop Demo with Docker Compose
2222

2323
```bash
24-
docker compose -f hub/src/test/resources/docker-compose-minio-localhost-hub.yml --profile local up -d
24+
docker compose -f hub/src/test/resources/docker-compose-minio-localhost-hub.yml --profile local up --wait
2525
docker compose -f hub/src/test/resources/docker-compose-minio-localhost-hub.yml --profile local down
2626
```
2727

hub/src/test/java/cloud/katta/testsetup/HubTestSetupDockerExtension.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ protected void setupDocker(final HubTestConfig.Setup.DockerConfig configuration)
6161
.withPull(true)
6262
.withEnv(env)
6363
.withOptions(configuration.profile == null ? "" : String.format("--profile=%s", configuration.profile))
64-
.waitingFor("wait-1", new LogMessageWaitStrategy().withRegEx(".*exit 0.*").withStartupTimeout(Duration.ofMinutes(2)));
64+
.waitingFor("minio_setup-1", new LogMessageWaitStrategy().withRegEx(".*Completed MinIO Setup.*").withStartupTimeout(Duration.ofMinutes(2)));
6565
compose.start();
66-
6766
log.info("Done setup docker {}", configuration);
6867
}
6968

hub/src/test/resources/docker-compose-minio-localhost-hub.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -395,37 +395,4 @@ services:
395395
curl -v --fail http://localhost:${HUB_PORT}/api/storageprofile/ -H "Authorization: Bearer $$ACCESS_TOKEN"
396396
echo "createbuckets successful"
397397
398-
wait-demo: # force `docker compose up -d` to wait for and check for the conditions below:
399-
profiles: [ demo ]
400-
image: busybox
401-
depends_on:
402-
minio_setup:
403-
condition: service_completed_successfully
404-
hub_setup_storage_profile:
405-
condition: service_completed_successfully
406-
entrypoint: [ "sh","-c" ]
407-
command:
408-
- |
409-
set -euxo pipefail
410-
exit 0
411-
healthcheck:
412-
test: [ "CMD-SHELL", "exit 0" ]
413-
interval: 10s
414-
timeout: 1s
415-
retries: 30
416398
417-
wait: # force `docker compose up -d` to wait for and check for the conditions below:
418-
image: busybox
419-
depends_on:
420-
minio_setup:
421-
condition: service_completed_successfully
422-
entrypoint: [ "sh","-c" ]
423-
command:
424-
- |
425-
set -euxo pipefail
426-
exit 0
427-
healthcheck:
428-
test: [ "CMD-SHELL", "exit 0" ]
429-
interval: 10s
430-
timeout: 1s
431-
retries: 30

0 commit comments

Comments
 (0)