Files
momentum devandClaude Opus 4.8 5ac2cc7b89 Docs cleanup: current-state rewrite + three deployment modes + history/
- 10 era documents (phase plans, build summaries, redesign writeups, old
  runbooks, completed consolidation plan) moved to docs/history/ with a
  do-not-follow README.
- Root README: current validated population ($2-20, 10-35% static gap +
  squeeze exception, SIP), Deployment section, automated-maintenance
  reality, corrected repo map (admin panel, youtube_claims, deploy/).
- RUNBOOK rewritten for the running system: daily rhythm, health checks
  per deployment, and the production failure-mode table earned this week
  (env drift, pgdata mount traps, uid 10001, zombie approvals, PG_SKIP_
  SCHEMA, timezone artifacts).
- deploy/README.md is now the three-mode index: compose (canonical),
  systemd (local dev — unit templates now committed), helm (refresh
  staged as issue #8). Old k8s doc moved to deploy/helm/README.md.
- docker/README.md: six TrueNAS gotchas, each from a real outage.
- Admin panel improvements staged as GitHub issues #4-#7.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 10:56:53 -04:00

25 lines
1015 B
Desktop File

[Unit]
Description=Momentum live paper-trading loop
# Self-heal: if the loop crashes or the box reboots, systemd brings it back.
# The DB host (192.168.1.5) can go fully unreachable (a network/host outage) and
# the loop crashes on connect — so retry FOREVER (no give-up limit) and it
# auto-reconnects the moment the host returns. StartLimitIntervalSec=0 disables
# the "give up after N starts" cap entirely.
StartLimitIntervalSec=0
[Service]
Type=simple
WorkingDirectory=/mnt/c/code/momentum
# the loop calls load_dotenv() -> finds .env in WorkingDirectory -> DATABASE_URL
# and all secrets load from there; no secrets in this unit file.
ExecStart=/home/philip/.venvs/momentum/bin/python -u run_live_paper.py --no-dashboard
Restart=always
RestartSec=30
# keep the same log file the operator + the review crons already tail
StandardOutput=append:/mnt/c/code/momentum/data/live_run.log
StandardError=append:/mnt/c/code/momentum/data/live_run.log
SyslogIdentifier=momentum-loop
[Install]
WantedBy=default.target