Migrate MVLog worker to webserver-local deployment

This commit is contained in:
hbrain 2026-06-07 15:22:03 +00:00
parent 8fc2e3b4c9
commit 85c4333e77
6 changed files with 126 additions and 19 deletions

View file

@ -6,7 +6,7 @@ Flat-folder Python + ffmpeg movie maker, plus optional MVLog worker.
- Input: one directory with mixed images/videos/audio + optional `data.txt`
- Output: one rendered MP4 with transitions, captions, intro/logo, stamps, and embedded metadata
- Optional worker (`mvlog_worker.py`) syncs/render/publishes MVLog jobs to a remote webserver
- Optional worker (`mvlog_worker.py`) renders/publishes MVLog jobs either locally on the webserver or via the older SSH/SCP remote mode
## Requirements
@ -96,7 +96,7 @@ clip01.mp4 audio: yes
## MVLog worker (`mvlog_worker.py`)
Worker is for MVLog web integration (remote `in-dir` -> local render -> remote `out-dir`).
Worker is for MVLog web integration. Preferred deployment is webserver-local: `/var/www/html/in-dir` -> render on the webserver -> `/var/www/html/out-dir`. Older SSH/SCP remote mode is still available for rollback/manual use.
Key points:
@ -107,18 +107,24 @@ Key points:
- Publishes output atomically and clears remote cache file
- Supports remote mode (SSH/SCP) and `--local` mode
Run once:
Run once on the webserver:
```bash
./mvlog_worker.py --local --remote-root /var/www/html --work-dir /srv/mvlog/work
```
Single job on the webserver:
```bash
./mvlog_worker.py --local --remote-root /var/www/html --work-dir /srv/mvlog/work --job 20260525_mohnesee
```
Older SSH/SCP remote mode from another machine:
```bash
./mvlog_worker.py
```
Single job:
```bash
./mvlog_worker.py --job 20260525_mohnesee
```
Force rerender:
```bash
@ -131,6 +137,25 @@ Pass extra movmaker args:
./mvlog_worker.py --movmaker-arg=--preview
```
## Webserver deployment
Recommended deployment keeps this repo checked out on the webserver at:
```text
/srv/mvlog/app
```
The worker writes temporary render data outside git at `/srv/mvlog/work` and publishes public files to `/var/www/html/out-dir`.
Systemd templates are in `deploy/systemd/`:
```bash
sudo cp deploy/systemd/mvlog-worker.service /etc/systemd/system/
sudo cp deploy/systemd/mvlog-worker.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now mvlog-worker.timer
```
## Notes
- This repo does **not** send web push itself; push is handled by MVLog web app server-side.