Skip to content

Commit d926d89

Browse files
authored
Merge pull request #226 from orionrobots/copilot/fix-225
Add healthcheck to http_serve target in docker compose with proper httpd configuration
2 parents 4d433aa + fd78e51 commit d926d89

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
_site
22
node_modules
33
.git
4-
.github
54
.editorconfig
65
.gitattributes
76
.gitignore

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ services:
8686
- ./htaccess:/usr/local/apache2/htdocs/.htaccess
8787
ports:
8888
- 8082:80
89+
healthcheck:
90+
test: ["CMD", "curl", "-o", "/dev/null", "-s", "http://localhost"]
91+
interval: 10s
92+
timeout: 5s
93+
retries: 5
94+
start_period: 30s
8995
profiles:
9096
- manual
9197

serve.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ FROM dcycle/broken-link-checker:3 AS broken_link_checker
2121

2222
FROM httpd:2.4.64 AS httpd_serve
2323

24+
# Install curl for healthcheck
25+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
26+
2427
# COPY _site /var/www/html/
25-
COPY .github/scripts/staging/http2.conf /etc/httpd/conf/httpd.conf
28+
COPY .github/scripts/staging/default.conf /usr/local/apache2/conf/httpd.conf
2629

2730
FROM base

0 commit comments

Comments
 (0)