Workerman requires pcntl and posix on Linux; without them the relay
printed "Please install pcntl extension" and exited immediately,
Docker kept restarting it, and nginx's DNS lookups for
dmtools-puzzle-relay intermittently failed whenever it happened to be
down mid-restart - the "could not be resolved" errors were a symptom
of this crash loop, not a separate networking problem. Local dev never
hit this because Workerman's Windows code path doesn't need either
extension.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a puzzle-relay service (docker-compose.yml) running the same
image as php but executing app:puzzle-relay instead of php-fpm, kept
off the host network - only nginx can reach it. nginx proxies
wss://dmtools.fvandenberg.nl/puzzle-ws/ through to it
(docker/nginx/default.conf), with the public URL set via a new
.env.prod. setup.sh/restart.sh now rebuild, restart, and clean up the
new container alongside the existing ones.
Still needs "Websockets Support" enabled on the NPM proxy host for
this domain, or the upgrade headers never reach the container.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
opcache.validate_timestamps=0 means php-fpm won't see updated
code/templates until it restarts. Add an explicit `dc restart php` at the
end so `./docker/setup.sh --no-build` reliably deploys a git pull.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
NPM (nginx_app_1) is connected to each stack's own default network by
hand, not to a shared docker_default. Drop the unused external `proxy`
network from the compose file; nginx just lives on dmtools_default.
setup.sh now connects NPM to it (no-op if already connected) and prints
the proxy-host settings.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DB_PORT was doing double duty - the container-internal port baked into
DATABASE_URL (must be 3306) and the host-published port in
docker-compose.yml. Setting it to 3306 for the URL made compose try to
publish host :3306, which collides with another stack's MySQL.
DATABASE_URL now hardcodes database:3306 (always correct inside the
compose network); the host publish uses ${DB_HOST_PORT:-3310}.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Hand-managed apk build deps + docker-php-ext-install was failing to build
on the server. Switch to the extension-installer image (same approach the
escapepage stack uses), which resolves system libs itself.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- docker/php/php.ini: upload_max_filesize 8M / post_max_size 10M
- docker/nginx/default.conf: client_max_body_size 10M
- ArtworkType: Image maxSize 8M with a clear message + help text
(local C:\php\php.ini was bumped from 2M the same way — not in the repo)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>