Skip to content

Commit d8d89b6

Browse files
committed
Use Docker healthcheck to await container start
1 parent 9a08872 commit d8d89b6

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ jobs:
2020
coverage: none
2121
- run: make
2222
- run: docker compose build
23-
- run: docker compose up -d
24-
- run: bash tests/await.bash http://clue.localhost/
23+
- run: docker compose up -d --wait
2524
- run: make test
2625
- run: docker compose stop -t 60
2726
timeout-minutes: 0.5

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ RUN vendor/bin/sculpin generate
2020
FROM php:8.1-apache
2121
RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled
2222
COPY --from=build /app/build/ /var/www/html/
23+
HEALTHCHECK --start-period=1m --start-interval=0.1s --interval=1h \
24+
CMD ["curl", "-I", "--no-progress-meter", "http://localhost/"]

tests/await.bash

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)