Files
wordpress-docker/shared/php-fpm/entrypoint.sh
Elijah Duffy f3c65de9da
All checks were successful
php-fpm-build / build (7.4) (push) Successful in 5m6s
php-fpm: refactor with deterministic config files & improved debug
2025-12-08 19:26:15 -08:00

20 lines
444 B
Bash

#!/bin/sh
set -eu
PHP_ENTRYPOINT="/usr/local/bin/docker-php-entrypoint"
if [ ! -x "${PHP_ENTRYPOINT}" ]; then
echo "[entrypoint] Missing ${PHP_ENTRYPOINT}" >&2
exit 1
fi
case "${CHOWN_ON_START:-}" in
1|true|TRUE|yes|on)
echo "[entrypoint] CHOWN_ON_START enabled — fixing ownership of /var/www/html"
if [ -d /var/www/html ]; then
chown -R 1000:1000 /var/www/html || true
fi
;;
esac
exec "${PHP_ENTRYPOINT}" "$@"