feat: add daily budget, active window, trade snapshots, and price impact monitor
- New migrations for daily_budget, active_window, and bottrade snapshot - Add trumpstruth scraper and price_impact_monitor service - Expand bot_engine, hyperliquid, recovery, and tp_sl_monitor logic - Update API/schemas/models for new features Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
[Unit]
|
||||
Description=TrumpSignal API + Truth Social poller
|
||||
After=network-online.target postgresql.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=trumpsignal
|
||||
Group=trumpsignal
|
||||
WorkingDirectory=/opt/trumpsignal/backend
|
||||
EnvironmentFile=/opt/trumpsignal/backend/.env
|
||||
ExecStart=/opt/trumpsignal/backend/venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
# Auto-restart on any exit (crash, OOM, segfault, manual kill).
|
||||
# RestartSec=10 = wait 10s between restart attempts so we don't hammer a broken state.
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
# Burst protection: if we crash > 5 times in 60s, give up (likely a real config bug,
|
||||
# not transient). Reset by `systemctl reset-failed trumpsignal-api`.
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=5
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/opt/trumpsignal/backend
|
||||
PrivateTmp=yes
|
||||
|
||||
# Logging — journald captures stdout/stderr; view with `journalctl -u trumpsignal-api -f`
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=trumpsignal-api
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user