add a healthcheck to the image and an HEALTHCHECK_PATH env var
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful
All checks were successful
ci/woodpecker/push/build_dev Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user