diff --git a/Dockerfile b/Dockerfile index df49722..77e51de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,5 +47,9 @@ ARG SOFTWARE_VERSION=1.20.0 ENTRYPOINT ["dumb-init", "--"] +# Requires docker engine 25+ for the --start-interval flag +HEALTHCHECK --interval=2m --timeout=2s --start-period=20s --start-interval=5s --retries=3 \ + CMD ["curl", "-fsS", "127.0.0.1/health.php"] + # Start both PHP-FPM, Nginx CMD ["/var/www/html/startup.sh"] diff --git a/health.php b/health.php new file mode 100644 index 0000000..3e25bf5 --- /dev/null +++ b/health.php @@ -0,0 +1,7 @@ +