Commit Graph
29 Commits
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 bbbae62d0b DOCROOT_SUBDIR only in DEV mode; XDEBUG_START defaults to trigger
Review follow-up (PR #61 review 121):
- create-vhost.sh ignores DOCROOT_SUBDIR (log line) unless environment=DEV,
  and entrypoint.sh only creates the folder in DEV. Defence in depth so a
  production container cannot move its web root through the env, even if a
  site owner got the variable into the container (WHP also denies it now).
- dev-mode.sh: XDEBUG_START defaults to trigger instead of yes, so CLI runs
  (wp-cli) do not print "Could not connect to debugging client" without an
  IDE. XDEBUG_START=yes still connects on every request.
- README/CLAUDE.md updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 07:24:44 -08:00
shadowdaoandClaude Sonnet 5.5 55c1a2b284 DOCROOT_SUBDIR: serve public_html/<sub> (Laravel/CodeIgniter/Symfony) for local dev
New env var DOCROOT_SUBDIR (default empty = unchanged bytes of the rendered vhost, verified by diff against the published image). Validated like WHP's panel/internal/vhost/docrootsub: ASCII letters, digits, . _ -; up to 4 segments, 64 bytes per segment, 128 total; no segment starting with . or -; no . / .. / empty segment; cgi-bin and the other reserved names refused; newline-safe. Invalid = FATAL message and exit 1. When set, DocumentRoot and the <Directory> move to public_html/<sub> and public_html itself gets Options None / AllowOverride None / Require all denied, the same shape WHP renders on the shared tier. The folder is created (as the customer) if missing. entrypoint now stops if create-vhost.sh fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 06:03:24 -08:00
shadowdaoandClaude Sonnet 5.5 2fe13fdab0 DEV mode ergonomics: display_errors, Xdebug, posix, HTTP redirect keeps the port
All DEV only (environment=DEV); production containers never read any of it and render identical config.
- /etc/php.d/99-dev.ini: display_errors=On, opcache.revalidate_freq=0 (error_reporting stays at the prod value: E_DEPRECATED floods wp-cli and PHP 8.5 startup)
- XDEBUG=1 installs php-pecl-xdebug3 from the same Remi module stream as the image's PHP and writes 98-xdebug-dev.ini (XDEBUG_MODE, XDEBUG_START, XDEBUG_CLIENT_HOST default host.docker.internal, XDEBUG_CLIENT_PORT default 9003; values validated); failure to install is a DEV failure (non-zero exit)
- php-process (posix) installed best effort
- create-vhost.sh: with PUBLIC_HTTPS_PORT set (DEV, not 443) the HTTP->HTTPS rewrite keeps the port
- README: DEV mode and Xdebug client settings sections

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 06:03:24 -08:00
shadowdaoandClaude Sonnet 5.5 e540110a46 README: use uid=$(id -u) and the current user in the manual recipe; AlmaLinux 10
The fixed uid=30001 recipe fails on a normal host (host-created logs/ is owned by the host uid, the entrypoint then cannot mkdir under it). Use -e uid=$(id -u) -e user=$(whoami), do not pre-create logs/, pick the PHP version by tag, mention PUBLIC_HTTPS_PORT. The entrypoint has no gid variable (adduser -u derives it), so only uid is documented. AlmaLinux 9 -> 10.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 06:03:24 -08:00
shadowdaoandClaude Sonnet 5.5 0eea05815a DEV mode: fix MariaDB/memcached install on AlmaLinux 10 and fail visibly
microdnf install MariaDB-server MariaDB-client memcached died in depsolve (MariaDB-client obsoletes the image's AppStream mariadb; mariadb-client-utils requires it), after which the entrypoint carried on: no mysqld, a mysql_creds file for a database that did not exist, and a container that reported healthy. Now (scripts/dev-mode.sh, used by cac and cac-fpm):
- dnf install --allowerasing MariaDB-server MariaDB-client from mariadb.org 11.4, falling back to AlmaLinux mariadb-server; memcached from AppStream; --setopt=skip_if_unavailable so one dead repo does not block the rest; install skipped when already present (docker start)
- initialise/chown the data dir, start mysqld, wait for mysqladmin ping (60 s) instead of sleep 10
- any failure is logged loudly (FATAL banner) and the entrypoint exits non-zero. The HEALTHCHECK only probes Apache, so 'unhealthy' could not express this; a non-zero exit is unmistakable in docker ps/logs. PROD never runs this code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 06:03:24 -08:00
shadowdaoandClaude Sonnet 5.5 7d6a007ef9 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
2026-11-23 06:03:23 -08:00
shadowdaoandClaude Sonnet 5.5 ce9fd87183 local-dev.sh: start a working container end to end
- mkdir of user/logs/{apache,system} was quoted (literal {apache,system} dir) and is no longer needed: the entrypoint creates logs itself
- drop the /var/log and /etc/httpd/logs bind mounts, which collided with the entrypoint (mv of /var/log/httpd: Device or resource busy, then 'unsafe entry' refusal to start)
- read credentials from /home/<user>/mysql_creds (where the entrypoint writes them), not /var/lib/mysql/creds
- -a N (and the default 83) now selects the image tag cac:phpNN instead of always pulling latest (latest is PHP 8.5); validated; CAC_IMAGE overrides for a locally built image
- wait for the container to be healthy (or fail with its logs) instead of sleep 160; WordPress download runs as the user and only into an empty web root
- instance_logs/instance_db_info use docker logs / the right creds path
- new flags -d (DOCROOT_SUBDIR) and -x (XDEBUG) and PUBLIC_HTTPS_PORT are passed through; they take effect with the image changes in the following commits

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-23 06:03:23 -08:00
shadowdaoandClaude Sonnet 5.5 47fef38052 install-php86: keep geoip (Remi php-rlerdorf-geoip provides php-pecl-geoip on 8.6); fix grep pipe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-19 11:37:57 -08:00
shadowdaoandClaude Sonnet 5.5 854042b1c3 feat: PHP 8.6 for cac and cac-fpm (Remi php:remi-8.6), per-family version lists in plan-legs
install-php86.sh = install-php85.sh minus php-pecl-geoip (no 8.6 build), fail-loud with
extension assertion. plan-legs.sh: per-family lists so cac/cac-fpm get 82-86 while
cac-litespeed/cac-lsphp stay 82-85 (no lsphp86). :latest stays on php85. ini files are
shared (single prod-php.ini), so 8.5 hardening incl. session.use_strict_mode=0 applies unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-19 11:32:25 -08:00
shadowdao 9f8beb45b8 Switching builds to include PHP version to limit memory requirements on deploy.
Cloud Apache Container / Build-and-Push (74) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (80) (push) Failing after 36s
Cloud Apache Container / Build-and-Push (81) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (82) (push) Failing after 55s
Cloud Apache Container / Build-and-Push (83) (push) Failing after 40s
Cloud Apache Container / Build-and-Push (84) (push) Failing after 57s
improve build size and speed for images.
2025-07-16 07:55:03 -07:00
shadowdao 88f462eb04 Updated the README.md
Cloud Apache Container / Build-and-Push (push) Successful in 1m1s
Added a healthcheck to the container
adjusted Apache limits for memory consumption
switch to microdnf for improved memory usage
2025-07-16 05:56:33 -07:00
shadowdao 4fd7ee465a Adding support for PHP 8.4 and upgrading MariaDB to 11.4.5
Cloud Apache Container / Build-and-Push (push) Successful in 47s
2025-03-16 10:43:16 -07:00
shadowdao 23253e9f37 fix spacing on versions 2024-10-15 18:50:11 -07:00
shadowdao b2675abc30 Fix/Update README.md 2024-10-15 18:44:09 -07:00
shadowdao 527ba5cf58 Adding better backups and log rotation, and updating files around it 2024-10-14 19:30:51 -07:00
shadowdao bbd2de6792 Update for log rotation and backups 2024-10-14 12:15:11 -07:00
jknapp ed9ba0118b Update to reflect changes for user directory
Cloud Apache Container / Build-and-Push (push) Successful in 41s
2024-10-14 17:28:24 +00:00
jknapp 715b998404 Update README to reflect gitea address and adding logs
Cloud Apache Container / Build-and-Push (push) Successful in 1m22s
2024-10-14 17:25:10 +00:00
shadowdao 520af5b3a8 Adding PHP 8.3 and updating README.md for moving repos 2024-10-02 08:58:42 -07:00
jknapp da8e2fcb9c Update Readme to reflect correction
Fix for command
2023-12-10 21:38:28 +00:00
shadowdao f11845a77d Updated to AlmaLinux 9 and reduced image size. Updated documentation to reflect move to ECR and changes 2023-05-27 11:13:18 -07:00
shadowdao be28df5f9e Add docker requirement line 2023-04-05 10:12:59 -07:00
shadowdao f0efcfe061 fix formatting on README.md 2023-04-05 10:04:24 -07:00
shadowdao df0e7d6a53 Adding more info to README.md 2023-04-05 09:48:17 -07:00
shadowdao 0dbb4f291b 1 more Fix README.md formatting 2023-04-05 09:27:50 -07:00
shadowdao faf55e9184 Fix README.md formatting 2023-04-05 09:27:03 -07:00
shadowdao 07dabd4375 Remove extra commands no longer needed in install php scripts, add content to README.md 2023-04-05 09:24:23 -07:00
shadowdao 95b9397067 Finished Cloud Apache Container 2023-04-05 07:53:20 -07:00
Josh Knapp 65f98084d6 add blank readme 2023-04-02 17:32:39 -07:00