Drives massprice.tcgplayer.com's Run Rule action per-rule on a user-configured schedule (multiple times/day, day-of-week toggles), replacing MassPrice's native scheduler (capped at 15 schedules account-wide, one run/day, with observed clock drift). Deployed via Forgejo push-to-deploy on Unraid, matching arr-summary/card-grader. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
4 KiB
| name | description |
|---|---|
| deploy-massprice | Use when deploying MassPrice Scheduler, restarting the massprice container on Unraid, confirming a deploy landed, or troubleshooting its scheduled-rule automation. |
Deployment
Target: Unraid server, container path /mnt/user/appdata/massprice,
built from Dockerfile/docker-compose.yml in this repo. Container name
massprice, port 5056 (overridable via HOST_PORT) → container port
5000.
Deploy mechanism: Forgejo push-to-deploy, the same pattern as
arr-summary, card-grader, lunch-notifier, n64-tracker — see
arr-summary's deploy-arr-summary skill or card-grader's CLAUDE.md
for the full runner mechanics. Push to main on the forgejo remote
(https://git.hippofam.com/ninja_hippo/massprice.git — create this repo
on the Forgejo instance first if it doesn't exist yet) triggers
.forgejo/workflows/deploy.yml, which syncs into
/mnt/user/appdata/massprice (excluding .git, .env, data/) and
runs docker compose up -d --build.
Restarting the container manually: use Compose, not the Unraid Docker UI — same reasoning as the other projects (every deploy recreates the container with a new Docker ID; Unraid's UI caches the old one). From the Unraid terminal:
cd /mnt/user/appdata/massprice && docker compose restart
docker compose up -d --force-recreate for a guaranteed-clean recreate;
docker ps --filter name=massprice to check real state.
Confirming a deploy landed: the footer renders
v<APP_VERSION> · <APP_VERSION_DATE> from constants near the top of
app.py. Bump them every commit.
First deploy checklist
- Create
/mnt/user/appdata/masspriceon Unraid and a real.envthere (copy.env.example, fill inLOGIN_PASSWORD,SECRET_KEY,MASSPRICE_USERNAME,MASSPRICE_PASSWORD,TZ). - First
docker compose up -d --build— confirm the container starts and/loginresponds onHOST_PORT. - Log into the webui, click "Refresh Rules" — confirms Playwright can
reach massprice.tcgplayer.com and log in automatically. If this
fails, check
data/run_history.json/container logs for the login error — the login form locators inautomation._login()were written generically (never verified against the real logged-out form, seeCLAUDE.md) and may need adjusting to match TCGplayer's actual field names/labels. - Set up at least one schedule and use "Run Now" once to confirm a
click actually lands — cross-check by looking at MassPrice's own
Activity Log (
https://massprice.tcgplayer.com/Activity/List) for a fresh timestamp on that rule. - Only after step 4 succeeds, go to each of the 5 existing rules on massprice.tcgplayer.com (three-dot menu → Edit Schedule) and set Status to Inactive, so native scheduling stops double-triggering runs and this tool becomes the sole source of scheduled runs.
Persistent state, never touched by deploys
.env holds LOGIN_PASSWORD, SECRET_KEY, and the MassPrice
credentials. data/ (bind-mounted to /data) holds schedules.json
(the schedules set from the webui), auth_state.json (the saved
MassPrice browser session — losing this just costs one re-login, not
data), run_history.json, and rules_cache.json. Both are excluded
from the deploy rsync (which runs --delete) and from git.
If scheduled runs stop working
Check, in order:
- Activity page in the webui — does the failure message say "still on a login page" (credentials/CAPTCHA problem) or "rule id not found" (a rule was renamed/deleted on MassPrice — click "Refresh Rules")?
- Is the container still running —
docker ps --filter name=massprice— a Chromium crash inside the container (rare, but possible ifshm_sizeever gets dropped fromdocker-compose.yml) would show as the container restarting. - Timezone —
TZin.envcontrols what "6:00 AM" means for every schedule; confirm it matches what the user actually expects before assuming a schedule itself is wrong.