feat: move daemon to docker with daily schedule and deduplication
All checks were successful
Deployment / deploy-docker (push) Successful in 17s

This commit is contained in:
Melchior Reimers
2026-01-23 17:24:05 +01:00
parent 7d9651e04c
commit 746c7167b0
5 changed files with 100 additions and 37 deletions

View File

@@ -6,37 +6,27 @@ on:
- main
jobs:
deploy-to-host:
deploy-docker:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10
with:
host: 172.17.0.1 # Standard-IP des Docker-Hosts aus Sicht des Containers
username: root # Dein Deployment-Nutzer
host: 172.17.0.1
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
mkdir -p /root/docker-files/trading-daemon
cd /root/docker-files/trading-daemon
# Repository klonen oder pullen
# Repository aktualisieren
if [ ! -d ".git" ]; then
git clone https://git.bana.space/krumbelfix/trading-daemon.git .
else
git pull origin main
fi
# Virtual Environment aktualisieren
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
# Docker Container neu bauen und starten
docker-compose up -d --build
# Systemd Update
cp systemd/trading-daemon.service /etc/systemd/system/
cp systemd/trading-daemon.timer /etc/systemd/system/
systemctl daemon-reload
# Neustart
systemctl restart trading-daemon.timer
systemctl start trading-daemon.service
echo "Deployment auf dem Host-System erfolgreich."
echo "Deployment abgeschlossen. Container laufen."