php-fpm: preinstall wp-cli, add WP-independent healthcheck
All checks were successful
nginx-build / build (push) Successful in 1m2s
php-fpm-build / build (7.4) (push) Successful in 5m23s

This commit is contained in:
Elijah Duffy
2025-12-09 13:30:27 -08:00
parent 238d3244b2
commit 0d00fd2ac4
4 changed files with 131 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ RUN set -eux; \
# Install runtime dependencies
apk add --no-cache \
bash \
curl \
freetype \
libjpeg-turbo \
libpng \
@@ -67,6 +68,10 @@ RUN set -eux; \
# Use production php.ini
cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
\
# Install WP-CLI for remedial administration
curl -fSL https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp; \
chmod +x /usr/local/bin/wp; \
\
# Clean up build dependencies
apk del .build-deps; \
rm -rf /var/cache/apk/* /tmp/*
@@ -85,6 +90,10 @@ COPY php-fpm/conf.d/ /usr/local/etc/php/conf.d/
# Copy the force-debug script (enablement is handled via conf.d/99-force-debug.ini)
COPY --chown=app:app shared/php-fpm/force-debug.php /usr/local/etc/php/force-debug.php
# Copy shared healthcheck assets
RUN mkdir -p /usr/local/share/auvem/health
COPY shared/php-fpm/healthcheck.php /usr/local/share/auvem/health/healthcheck.php
# Copy pool configuration from this directory
COPY --chown=app:app php-fpm/${BASE_VERSION}/www.conf /usr/local/etc/php-fpm.d/www.conf
# Copy the global php-fpm configuration so logging defaults are predictable