fix running viewer-sync error on docker deploy

This commit is contained in:
2026-05-19 19:44:01 +03:30
parent da19b6a8a2
commit cdb89d3287
2 changed files with 1 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ Only publish HTTP and RTMP by default. Keep MediaMTX HLS behind Apache and keep
- When changing MediaMTX ports, update Compose environment, published ports, entrypoint defaults, and the template together.
- When changing Laravel runtime behavior, update the shared `x-app-environment` block unless the value belongs to one role only.
- When changing queue behavior, prefer env-driven options on the `queue` service and `docker/app/entrypoint.sh`.
- Do not run the long-lived Docker `viewer-sync` service with `--isolated`; a stale cache lock can make the command exit cleanly and trigger an endless container restart loop.
- Keep `npm run build` after PHP setup and Composer install in `docker/app/Dockerfile`; the Wayfinder Vite plugin invokes `php artisan wayfinder:generate` during the build. The asset stage must also provide safe build-time Laravel env values, create Laravel writable directories such as `storage/framework/views`, and run `php artisan wayfinder:generate --with-form --no-interaction` before `npm run build` so failures are visible in Docker logs.
- Do not call `php artisan storage:link --force` as `www-data` during container startup; `public/storage` lives in the root-owned image filesystem. Create the symlink as root in the entrypoint if it is missing.
- Keep deploy script behavior idempotent: repeat runs should update the Git checkout, rebuild, migrate, and restart services without deleting volumes.

View File

@@ -131,7 +131,6 @@ case "$role" in
;;
viewer-sync)
exec gosu www-data php artisan streaming:sync-viewer-counts \
--isolated \
--interval="${STREAMING_VIEWER_SYNC_INTERVAL:-2}"
;;
artisan)