add a healthcheck to the image and an HEALTHCHECK_PATH env var
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful

This commit is contained in:
Ruben Momoa
2024-08-30 13:52:14 +02:00
parent a6400ebb95
commit 5d9b68323b

View File

@@ -4,6 +4,7 @@ FROM php:${BASE_VERSION}-fpm-alpine
# port to for the webserver
ENV WEBSERVER_PORT=8080
ENV HEALTHCHECK_PATH=""
COPY start-container.sh /usr/local/bin/start-container
@@ -32,6 +33,9 @@ RUN apk add --no-cache \
&& docker-php-ext-install filter pdo_mysql \
&& chmod +x /usr/local/bin/start-container
HEALTHCHECK --interval=5m --timeout=3s --start-period=5m --start-interval=10s \
CMD curl -f http://localhost/${HEALTHCHECK_PATH} || exit 1
EXPOSE ${WEBSERVER_PORT}
WORKDIR /var/www/html