feat: deploy — systemd service, mode: live, .gitignore
- config.yaml: mode: paper → live - .gitignore: добавить .env, .DS_Store - deploy/scalp-bot.service — systemd user unit - deploy/update.sh — скрипт обновления на сервере Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,3 +2,5 @@ cache/
|
|||||||
data/
|
data/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
.venv/
|
.venv/
|
||||||
|
.env
|
||||||
|
.DS_Store
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
mode: paper # paper | live
|
mode: live # paper | live
|
||||||
capital: 0 # 0 = auto-fetch from exchange balance
|
capital: 0 # 0 = auto-fetch from exchange balance
|
||||||
timeframe: "5m"
|
timeframe: "5m"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=scalp-bot ETH futures scalper (Bybit)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/home/anor/scalp-bot
|
||||||
|
EnvironmentFile=/home/anor/scalp-bot/.env
|
||||||
|
ExecStart=/home/anor/scalp-bot/.venv/bin/python cli.py daemon
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
|
KillSignal=SIGTERM
|
||||||
|
TimeoutStopSec=30
|
||||||
|
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier=scalp-bot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
cd /home/anor/scalp-bot
|
||||||
|
git pull --ff-only
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -r requirements.txt --quiet
|
||||||
|
echo "Updated. Restart: systemctl --user restart scalp-bot"
|
||||||
Reference in New Issue
Block a user