quotes.pb.js is copied byte-for-byte from the live WFDASH PocketBase. DEPLOY lists the hooks the VPS cron syncs into the hooks volume; the audit hooks stay undeployed for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| sync-pb-hooks.sh | ||
PocketBase hooks sync (WFDASH)
The live WFDASH PocketBase (Coolify service pocketbase-wfdash, container
pocketbase-gnqc88suy8fqk6wyryjjdpvl, PocketBase 0.39.8) loads its hooks
from the Docker volume gnqc88suy8fqk6wyryjjdpvl_pocketbase-hooks, mounted
at /app/pb_hooks.
Hooks are deployed from git, not edited on the server:
- Edit or add files in
pocketbase/pb_hooks/in this repo. - List every file to deploy in
pocketbase/pb_hooks/DEPLOY. - Push to
mainon Forgejo.
Within ~2 minutes the VPS cron runs sync-pb-hooks.sh, which pulls main
into /opt/wfdash-pb-hooks/repo (sparse clone, read-only deploy key) and
copies the listed files into the volume. PocketBase reloads itself when a hook
file changes. A .js file on the server that isn't in DEPLOY is removed.
- Log:
/var/log/wfdash-pb-hooks-sync.logon the VPS. - Force a sync:
/opt/wfdash-pb-hooks/repo/scripts/pb-hooks/sync-pb-hooks.sh --force - Roll back: revert the commit (or remove the line from
DEPLOY) and push. - Pause syncing: comment out the cron line (
crontab -eas root).
The sync never touches pb_data (the database).