Options-Trading-Plattform mit Streamlit + PostgreSQL.
Production: https://app.skuld-options.com/
| Tool | Windows | Mac |
|---|---|---|
| Git | winget install Git.Git |
brew install git |
| Python 3.10+ | https://python.org/downloads | brew install python@3.13 |
| Docker Desktop | winget install Docker.DockerDesktop |
brew install --cask docker |
| GitHub CLI | winget install GitHub.cli |
brew install gh |
gh auth loginWaehle: GitHub.com > HTTPS > Login with a web browser
Windows PowerShell Tipp: Falls
ghnicht erkannt wird:& "C:\Program Files\GitHub CLI\gh.exe" auth login
git clone https://github.com/Wuuzzaa/Skuld.git
cd Skuld
python -m venv .venvAktivieren:
# Windows PowerShell
.venv\Scripts\activate
# Mac / Linux
source .venv/bin/activateDependencies installieren:
pip install -r requirements.txtcd ops/skuld-cli
pip install -e .
cd ../..Pruefen ob alles funktioniert:
skuld doctorErwartete Ausgabe:
OK gh CLI found
OK gh authenticated
OK Repository Wuuzzaa/Skuld accessible
All checks passed.
git push master ───────> Automatisches Production-Deployment (Hetzner)
skuld deploy home ─────> Manuelles Staging-Deployment (Heimserver)
- Push auf
master= automatisches Production-Deployment. Kein manueller Schritt noetig. - Push auf andere Branches = es passiert NICHTS. Kein Deployment.
- Staging-Deployment = immer manuell ueber das CLI-Tool.
git checkout master
git merge feature/mein-feature
git push origin master
# -> Production-Deployment startet automatisch# Aktuellen Branch auf Staging testen
skuld deploy home --branch feature/mein-feature
# Master auf Staging deployen
skuld deploy homeskuld watch deploy.yml
# oder
skuld statusKopiert die komplette Production-DB auf den Heimserver (ERSETZT die Staging-DB):
skuld db replicate --source productionskuld db backup production
skuld db backup homeskuld db healthcheck production
skuld db healthcheck homeDie Produktions-DB ist ca. 17 GB (6 GB komprimiert). Fuer lokale Entwicklung:
Option A: Leere DB (schnell, kein SSH noetig)
# Windows
.\setup_scripts\manage_local_db.ps1
# Waehle Option 3: "Start with EMPTY database"Option B: Mit Production-Daten (braucht SSH-Zugang)
- SSH-Key generieren:
ssh-keygen -t ed25519 -C "dein.name@email.com" - Public Key an Admin schicken:
cat ~/.ssh/id_ed25519.pub - Nach Freischaltung:
.\setup_scripts\manage_local_db.ps1 # Waehle Option 2: "Download latest from Remote Server"
Lokale DB-Verbindung:
| Service | URL / Port |
|---|---|
| PostgreSQL | localhost:5432 (User: dev, Pass: dev, DB: skuld_dev) |
| PgAdmin | http://localhost:5051 (Login: admin@admin.com / admin) |
Jobs werden auf den Servern ausgefuehrt, nicht lokal:
# Verfuegbare Jobs
skuld jobs run <target> <job>
# Beispiele
skuld jobs run home option_data # Option-Daten laden
skuld jobs run home saturday_night # Samstag-Nacht Job
skuld jobs run home stock_data_daily # Taegliche Stock-Daten
skuld jobs run production option_data # Auf Production ausfuehrenVerfuegbare Jobs: saturday_night, option_data, market_start_mid_end, stock_data_daily, historization
| Befehl | Beschreibung |
|---|---|
skuld doctor |
Pruefen ob alles eingerichtet ist |
skuld status |
Environments + letzte Workflow-Runs |
skuld deploy production |
Production deployen (= git push master) |
skuld deploy home |
Master auf Staging deployen |
skuld deploy home --branch xyz |
Branch xyz auf Staging deployen |
skuld db replicate --source production |
Prod-DB auf Staging kopieren |
skuld db backup production |
Backup auf Production erstellen |
skuld db healthcheck home |
DB-Status auf Staging pruefen |
skuld jobs run home option_data |
Job auf Staging ausfuehren |
skuld watch deploy.yml |
Laufenden Workflow beobachten |
streamlit run Skuld/app.pyDie App laeuft auf http://localhost:8501 (braucht laufende PostgreSQL-DB).
pytestEntwickler-Laptop GitHub Actions Server
────────────────── ────────────── ──────
git push master ────────> deploy.yml ───────────> Production (Hetzner)
91.98.156.116
skuld deploy home ──────> deploy.yml ───────────> Staging (Heimserver)
(self-hosted runner) 192.168.0.235
- Secrets: GitHub Repository Secrets (9 Stueck, keine per-Environment Secrets)
- Config:
ops/environments.yaml(Single Source of Truth fuer alle Environments) - CLI:
ops/skuld-cli/(Wrapper um GitHub Actions Workflows)
| Problem | Loesung |
|---|---|
skuld: command not found |
cd ops/skuld-cli && pip install -e . |
gh: command not found |
winget install GitHub.cli (Win) / brew install gh (Mac) |
gh not authenticated |
gh auth login |
PowerShell erkennt gh nicht |
& "C:\Program Files\GitHub CLI\gh.exe" auth login |
| Deploy auf Staging schlaegt fehl | skuld db healthcheck home pruefen |
| DB Replikation timeout | Backup ist ~6 GB, kann 15-20 Min dauern |