File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 25
25
26
26
- name : Run as service and test
27
27
run : |
28
- # Start the staging service using docker compose (context will be _site now)
29
- docker compose up -d --build staging
30
-
31
- # Wait for the health check to pass (healthcheck should handle readiness)
32
- echo "Waiting for service to be ready..."
33
- timeout 60 bash -c 'until curl -f http://localhost:8080/ >/dev/null 2>&1; do sleep 2; done'
28
+ # Start the staging service using docker compose with --wait for health checks
29
+ # Use CI-specific override for GitHub Actions cache
30
+ docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait staging
34
31
35
32
# Perform the tests
36
33
set +e # Don't exit on error so we can clean up
41
38
curl -I -f http://localhost:8080/wiki/lego || exit_code=1
42
39
43
40
# Stop the service regardless of test outcome
44
- docker compose stop staging
41
+ docker compose -f docker-compose.yml -f docker-compose.ci.yml stop staging
45
42
46
43
# Exit with the test result
47
44
exit $exit_code
Original file line number Diff line number Diff line change
1
+ services :
2
+ staging :
3
+ build :
4
+ cache_from :
5
+ - type=gha
6
+ cache_to :
7
+ - type=gha,mode=max
Original file line number Diff line number Diff line change @@ -109,10 +109,6 @@ services:
109
109
build :
110
110
context : ./_site
111
111
dockerfile : ../.github/scripts/staging/Dockerfile
112
- cache_from :
113
- - type=gha
114
- cache_to :
115
- - type=gha,mode=max
116
112
ports :
117
113
- 8080:80
118
114
healthcheck :
You can’t perform that action at this time.
0 commit comments