Commit Graph

17 Commits

Author SHA1 Message Date
Fabian @ Blax Software fc71927211 docs: check the PECL extensions of a rebuilt image before pushing it
The php base tag isn't pinned, and a pecl install that fails only prints a
NOTICE, so a rebuild can succeed without redis or imagick and break every app
on the tag at its next restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:09:42 +01:00
Fabian @ Blax Software 2d6d6383de feat(nginx): internal /_accel/ location for X-Accel-Redirect from storage/app
An app that has authorised a file can answer with an empty body and
"X-Accel-Redirect: /_accel/<path under storage/app>"; nginx then sends the file
itself (Range requests included). The location re-adds the CORS headers from the
upstream response, which nginx otherwise drops on this redirect. The php location
announces it to PHP as $_SERVER['X_ACCEL_STORAGE'] = '/_accel/'.

Harmless for an app that does not use it: the location is `internal`, reached
only through an X-Accel-Redirect the app itself returns, so no response of such
an app changes. The one visible difference is that an external request to
/_accel/... gets nginx's 404 instead of reaching the app's front controller; no
app here routes under /_accel/. The fastcgi param only adds a server variable
nothing reads unless the app asks for it (it is not a request header, so it
changes no headers, and Symfony's own X-Sendfile support ignores it). nginx -t
passes on 1.26.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:58:52 +01:00
Fabian @ Blax Software 3a8cbfed6c docs: maintainer section and homepage link to blax.at
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:33:09 +01:00
Fabian @ Blax Software cb09cb10f9 harden: session.upload_progress.enabled off by default (PHP2Shell, CVE-2026-109618)
Laravel never reads upload progress. Images built from this commit also pick up
the patched PHP 8.4.27 / 8.3.36 / 8.2.35 base (CVE-2026-109618, CVE-2026-109619).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 16:23:08 +02:00
Fabian @ Blax Software 879d7f4dcf fix(docker): add librsvg for improved SVG handling in Imagick 2026-07-02 14:15:54 +02:00
Fabian @ Blax Software fb51d25984 harden: run tini as PID 1 for guaranteed zombie reaping
Defense-in-depth: any process reparented to PID 1 (e.g. a child orphaned by a
program that forks and exits without waiting) is now reaped by tini. supervisord
already reaps its own tree and reparented orphans, so this mirrors the
docker-bastion image as belt-and-suspenders. No -g (tini forwards SIGTERM to
supervisord, preserving its ordered per-program graceful stop); no -s (tini is
already PID 1). tini installs at /usr/bin/tini on the Debian base.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 11:07:10 +02:00
Fabian @ Blax Software 9f63d8e98b fix(docker): restore ENTRYPOINT [start-container] — adding HEALTHCHECK had dropped it
Adding the HEALTHCHECK replaced the ENTRYPOINT line instead of sitting alongside
it, so the image fell back to the base php:8.4-fpm entrypoint (php-fpm alone):
supervisord/start-container never ran, nginx was down (port 80 unserved -> /api
404 via Traefik) and supervisorctl was absent (-> always UNHEALTHY). Restore the
entrypoint; HEALTHCHECK stays.
2026-06-12 16:59:58 +02:00
Fabian @ Blax Software 9cb3ae5bce fix(docker): queue/scheduler/horizon resilience + container HEALTHCHECK
- start-container: generous startretries + startsecs and graceful SIGTERM
  stopwaitsecs for queue/scheduler/horizon, so a transient boot failure (e.g.
  DB not ready) no longer marks a worker FATAL forever and silently drops jobs,
  and an in-flight job finishes before SIGKILL on deploy/restart.
- container-health: new HEALTHCHECK that reports UNHEALTHY when php-fpm/nginx or
  any enabled queue/scheduler/horizon worker is not RUNNING, so a dead worker
  surfaces in docker ps / orchestration instead of letting jobs pile up.
2026-06-12 15:57:59 +02:00
Fabian Wagner ➖ a6a2f5842 c4fb894699
fix(perms,mysql): auto-fix storage ownership + skip self-signed cert verify (#1)
Two recurring foot-guns in production stacks rolled into one image-level fix:

1. storage/ + bootstrap/cache/ ownership drift. ENABLE_LARAVEL_PERMS was
   opt-in (default 0) and only chmod'd the top-level dir — so any subdir
   created later by a different UID (root, nobody, …) stayed un-writable
   for www-data. Symptom: workkit:db:backup pumping a multi-GB mysqldump
   into a doomed bash redirect that fails with "Permission denied" only
   after the pipeline starts. Now default-on (=1), recursive chown +
   chmod ug+rwX, SGID on dirs so future files inherit the group, and we
   pre-create the subdirs that ship empty (incl. storage/backups/) so
   artisan never creates one as the wrong user.

2. mysql client TLS verification against self-signed in-cluster certs.
   `php artisan db` failed with "TLS/SSL error: self-signed certificate
   in certificate chain" because modern mysql/mariadb clients auto-enable
   ssl-verify-server-cert when a password is on argv. Drops a
   /etc/mysql/conf.d/00-laravel-client.cnf with ssl-verify-server-cert=OFF
   so the connection still negotiates TLS but skips the chain check —
   the right tradeoff for a private docker network. Override per-host
   with MYSQL_CLIENT_VERIFY=ON or by mounting a stricter .cnf.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:22:07 +02:00
Fabian @ Blax Software cc3e590d62 A Blax Software OSS banner to README
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:08:27 +02:00
Fabian @ Blax Software 8df9f13787 I star history in README
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 16:44:37 +02:00
Fabian @ Blax Software 8f8cba49db I publish script 2026-04-23 11:49:01 +02:00
Fabian @ Blax Software 4e9d7a629c I safe directory inside 2026-04-23 11:04:47 +02:00
Fabian @ Blax Software 6e1f43fcbc chore: use blaxsoftware/laravel as default image name, make REGISTRY optional, drop npm@latest install 2026-04-16 08:42:05 +02:00
Fabian @ Blax Software 99eec4efbb chore: clean up stale root files, minor doc edits 2026-04-15 10:12:08 +02:00
Fabian @ Blax Software 34a26f3641 polish README: better intro, full tag list 2026-04-15 10:00:23 +02:00
Fabian @ Blax Software 7ccb8b94fe Initial commit: multi-version PHP+Nginx Docker image for Laravel 2026-04-15 09:57:37 +02:00