From 1bda3e58094dc83ddd064a6a59c2650eb18f4563 Mon Sep 17 00:00:00 2001 From: benbrummer Date: Fri, 29 Aug 2025 08:02:56 +0200 Subject: [PATCH 1/3] Use health endpoint for HEALTHCHECK Signed-off-by: benbrummer --- debian/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index a31b968..107df7e 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -23,6 +23,7 @@ ARG php_extra="opcache" # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ + libfcgi-bin \ mariadb-client \ gpg \ supervisor \ @@ -78,8 +79,8 @@ COPY --from=prepare-app /tmp/public /tmp/public COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh # Health check -HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ - CMD pgrep -f "php-fpm: master process" +HEALTHCHECK --start-period=10s \ + CMD REMOTE_ADDR=127.0.0.1 REQUEST_URI=/health REQUEST_METHOD=GET SCRIPT_FILENAME=/var/www/html/public/index.php cgi-fcgi -bind -connect 127.0.0.1:9000 | grep '{"status":"ok","message":"API is healthy"}' ENTRYPOINT ["/usr/local/bin/init.sh"] CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"] From 61728ec89b9d851a094aae86c5f43f971d722c85 Mon Sep 17 00:00:00 2001 From: benbrummer Date: Fri, 29 Aug 2025 12:51:27 +0200 Subject: [PATCH 2/3] Fix mariadb-client connection to mysql Debian Trixie has a new mariadb-client, with encryption by default Signed-off-by: benbrummer --- debian/scripts/init.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index 207bbd7..491d2de 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -38,6 +38,10 @@ if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then /var/www/html/storage \ -type d -exec chmod 755 {} \; + # Fix mariadb-client connection to mysql + echo "[client]\nskip-ssl = true" > /var/www/.my.cnf + chown www-data:www-data /var/www/.my.cnf + # Clear and cache config in production if [ "$APP_ENV" = "production" ]; then runuser -u www-data -- php artisan optimize From d1621f0fe5075dd38ba14ab153d8ed19e0b6404c Mon Sep 17 00:00:00 2001 From: benbrummer Date: Fri, 29 Aug 2025 12:57:55 +0200 Subject: [PATCH 3/3] PHP 8.4 Signed-off-by: benbrummer --- debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 107df7e..64d324b 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP=8.3 +ARG PHP=8.4 FROM php:${PHP}-fpm AS prepare-app