Skip to content

Version 2.2.0

Choose a tag to compare

@paskal paskal released this 12 Sep 10:34
· 63 commits to master since this release
v2.2.0
a837951

Operations release: every core container now reports a health state, uploaded SVG is sandboxed, identical files under upload/ can be merged monthly, and the production pull wrapper validates nginx configuration on the right network.

Health checks

  • nginx, php, php-cron and mysql carry health checks in docker-compose.yml: nginx probes its stub_status vhost on port 8084, php opens a TCP connection to port 9000 (replacing the image's php --ini, which passed while php-fpm was down), php-cron looks for the cron daemon, mysql pings over its socket. Start order is unchanged; dependencies do not wait on health checks.
  • On hosts that already use the standard "Docker by Zabbix agent 2" template, it can alert on the new health states.

nginx

  • /upload/**.svg is served with Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox, the policy bitrix-env ships for the same path, so script inside an uploaded SVG cannot run in the site origin when the file is opened as a document. The same policy disables other active or external content in such documents; a site that serves interactive SVG documents from upload/ needs to adjust the rule.
  • The scanner fast-404 list gains .old, .save and a trailing ~.

Upload deduplication

  • scripts/dedup-upload.sh replaces byte-identical files under web/prod/upload with hard links using hardlink from util-linux: owner, mode and extended attributes must match, only the modification time is ignored. The listed scratch, exchange and log directories of known modules are excluded, a lock keeps two dedup runs apart, and the full hardlink output with its exit status goes to logs/dedup-upload.log; --dry-run shows what a run would save. config/cron/host.cron runs it on the first of every month at 02:20 host time.

Fixes

  • scripts/pull-public.sh, this deployment's pull wrapper, validates a changed nginx file bind in a fresh container on php's network, so the php upstream resolves when nginx belongs to more than one network. Before, the test container joined the first network in nginx's list, the validation failed there and nginx was not restarted.

Upgrade notes

  1. Recreate nginx, php, php-cron and mysql after pulling so the health checks attach; the mysql recreate restarts the database.
  2. The deduplication needs hardlink from util-linux and flock on the host; the script exits with a message when either is missing.
  3. Hard links share later in-place writes between the merged copies. Before enabling the monthly job, check which processes write under your upload/ and extend the excluded directories in the script accordingly; the lock only prevents a second dedup run, it does not hold off importers or the image optimiser.