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
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Project Overview
|
||||
|
||||
Cloud Apache Container (CAC) is a Docker-based PHP web hosting environment that supports multiple PHP versions (7.4 through 8.4) with Apache, designed for both local development and production deployment.
|
||||
Cloud Apache Container (CAC) is a Docker-based PHP web hosting environment that supports multiple PHP versions (7.4 through 8.6) with Apache, designed for both local development and production deployment.
|
||||
|
||||
## Common Development Commands
|
||||
|
||||
@@ -29,14 +29,14 @@ Cloud Apache Container (CAC) is a Docker-based PHP web hosting environment that
|
||||
docker build -t cac:latest .
|
||||
|
||||
# Build with specific PHP version
|
||||
docker build --build-arg PHP_VER=83 -t cac:php83 .
|
||||
docker build --build-arg PHPVER=83 -t cac:php83 .
|
||||
|
||||
# Run container manually
|
||||
docker run -d -p 80:80 -p 443:443 \
|
||||
-e PHPVER=83 -e environment=DEV \
|
||||
-e environment=DEV \
|
||||
-e uid=$(id -u) -e user=$(whoami) -e domain=localhost \
|
||||
-v"$(pwd)/user":/home/$(whoami) \
|
||||
--name test-container cac:latest
|
||||
--name test-container cac:php83
|
||||
```
|
||||
|
||||
### Server Deployment
|
||||
@@ -64,7 +64,7 @@ docker run -d -p 80:80 -p 443:443 \
|
||||
- **PROD** (default): Expects external database/cache services
|
||||
|
||||
3. **PHP Version Management**:
|
||||
- Controlled via `PHPVER` environment variable (74, 80, 81, 82, 83, 84)
|
||||
- Fixed by the IMAGE TAG (`cac:php83`, ...; `cac:latest` = PHP 8.5). The `PHPVER` env var does not switch versions; DEV mode warns if it disagrees with the image
|
||||
- Each version has dedicated install script in `/scripts/`
|
||||
- PHP-FPM configuration dynamically created based on version
|
||||
|
||||
|
||||
Reference in new issue
Block a user