diff --git a/.dockerignore b/.dockerignore index 14f954de..8b5c83ec 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,6 @@ _site node_modules .git -.github .editorconfig .gitattributes .gitignore diff --git a/docker-compose.yml b/docker-compose.yml index 7e1e5d1b..1c5e4eed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -86,6 +86,12 @@ services: - ./htaccess:/usr/local/apache2/htdocs/.htaccess ports: - 8082:80 + healthcheck: + test: ["CMD", "curl", "-o", "/dev/null", "-s", "http://localhost"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s profiles: - manual diff --git a/serve.Dockerfile b/serve.Dockerfile index 126d7af2..01f3ee00 100644 --- a/serve.Dockerfile +++ b/serve.Dockerfile @@ -21,7 +21,10 @@ FROM dcycle/broken-link-checker:3 AS broken_link_checker FROM httpd:2.4.64 AS httpd_serve +# Install curl for healthcheck +RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* + # COPY _site /var/www/html/ -COPY .github/scripts/staging/http2.conf /etc/httpd/conf/httpd.conf +COPY .github/scripts/staging/default.conf /usr/local/apache2/conf/httpd.conf FROM base