PHPVER does not select the PHP version: say so, warn in DEV mode
The PHP version is the image tag (cac:phpNN); PHPVER was only a leftover default. README/CLAUDE.md now state that, that cac:latest is PHP 8.5 today (not 8.3), and fix the stale PHP_VER build arg name. In DEV mode only, entrypoint.sh and entrypoint-fpm.sh warn loudly at start if an explicitly set PHPVER does not match the image's PHP (new scripts/dev-mode.sh, sourced in DEV only). PROD is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
ce9fd87183
commit
7d6a007ef9
5 files changed
+28
-168
No files matched your search
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PHPVER does not select anything at runtime: the PHP version is the image tag
|
||||
# (cac-fpm:php83, ...). Remembered so DEV mode can warn on a mismatch.
|
||||
PHPVER_REQUESTED="$PHPVER"
|
||||
if [ -z "$PHPVER" ]; then
|
||||
PHPVER="83";
|
||||
fi
|
||||
@@ -35,6 +38,11 @@ echo "Container memory: ${CONTAINER_MEMORY_MB}MB | PHP-FPM pm=${PHP_FPM_PM} max_
|
||||
/scripts/create-php-config.sh
|
||||
|
||||
mkdir -p /run/php-fpm/
|
||||
# DEV only: PHP overrides + optional Xdebug must be in place before php-fpm starts.
|
||||
if [[ $environment == 'DEV' ]]; then
|
||||
source /scripts/dev-mode.sh
|
||||
dev_check_phpver "$PHPVER_REQUESTED"
|
||||
fi
|
||||
# php-fpm opens its slowlog under /home/$user/logs as root: last fail-closed
|
||||
# check immediately before it starts (safe-paths.sh).
|
||||
require_safe_logs /home/$user/logs/php-fpm
|
||||
|
||||
Reference in new issue
Block a user