Massprice/docker-compose.yml
Barely Removable 213837ff97
All checks were successful
Deploy / deploy (push) Successful in 28s
Poll for run completion every 5 minutes instead of checking once
The one-shot VERIFY_DELAY_MINUTES check was too rigid: MassPrice's
processing time varies widely in practice (observed ~1 to over 20
minutes, and its queue can back up further under load — confirmed
live, a run still sitting in "Queued" 15+ minutes in), so a single
check window either misses slow-but-fine completions or has to be set
needlessly long.

Replaced with a poll loop: scheduler.py reschedules another one-off
check every VERIFY_POLL_MINUTES (default 5) until automation's
check_completion() reports "complete", up to VERIFY_MAX_ATTEMPTS
(default 12, ~1 hour) before giving up and marking "not_confirmed" for
good. verify_run() is split into a pure check_completion() (no storage
side effects) so scheduler.py's loop owns the retry/give-up decision;
automation.py just answers "is it done yet".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
2026-08-31 23:58:23 -07:00

24 lines
890 B
YAML

services:
massprice:
build: .
container_name: massprice
# Headless Chromium's default /dev/shm (64MB) is too small in Docker
# and causes renderer crashes — this is the standard mitigation.
shm_size: "1gb"
ports:
- "${HOST_PORT:-5057}:5000"
volumes:
# Schedules, run history, the rule-name cache, and the saved
# MassPrice login session must outlive `up -d --build`, which
# recreates the container and discards its filesystem.
- ./data:/data
environment:
- LOGIN_PASSWORD=${LOGIN_PASSWORD}
- SECRET_KEY=${SECRET_KEY}
- TZ=${TZ:-America/Phoenix}
- VERIFY_POLL_MINUTES=${VERIFY_POLL_MINUTES:-5}
- VERIFY_MAX_ATTEMPTS=${VERIFY_MAX_ATTEMPTS:-12}
- GMAIL_USER=${GMAIL_USER:-}
- GMAIL_APP_PASSWORD=${GMAIL_APP_PASSWORD:-}
- ALERT_EMAIL=${ALERT_EMAIL:-}
restart: unless-stopped