ziscoandClaude Sonnet 5 bc23025bb3
Deploy PBT / deploy (push) Successful in 22s
Test commit to verify git auth
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011qSzn8eAWPQ7qHzXH5QGzC
2026-09-09 21:43:24 +02:00
2026-09-09 19:57:34 +02:00
2026-09-09 20:24:05 +02:00
2026-09-09 21:43:24 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 17:34:10 +02:00
2026-09-09 17:39:25 +02:00
2026-09-09 19:54:42 +02:00

PBT Öffi-Erfahrungen (pbt.zisco.at)

Lokal auf der LXC einrichten

cd /opt/pbt   # oder wohin du die Dateien kopierst
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

export PBT_DATABASE_URL="postgresql://pbt_app:DEIN_PASSWORT@<postgres-ip-oder-hostname>/pbt"
export PBT_SECRET_KEY="ein-langer-zufaelliger-string"

python app.py   # Testlauf auf Port 5000

Beim ersten Start legt die App die Tabellen (users, fahrten) automatisch per db.create_all() an dafür braucht der User pbt_app CREATE-Rechte in der DB (sollte durch GRANT ALL PRIVILEGES ON DATABASE pbt TO pbt_app; bereits gegeben sein).

Produktivbetrieb mit systemd + Gunicorn

  1. Projekt nach /opt/pbt kopieren, virtuelle Umgebung dort anlegen (s. oben).
  2. pbt.service nach /etc/systemd/system/pbt.service kopieren, DB-URL und Secret-Key darin anpassen.
  3. Aktivieren:
    systemctl daemon-reload
    systemctl enable --now pbt
    systemctl status pbt
    
    Die App lauscht dann intern auf 127.0.0.1:8000.

Caddy-Eintrag

In der Caddy-LXC in der Caddyfile ergänzen:

pbt.zisco.at {
    reverse_proxy 10.10.10.24:8000
}

(IP durch die tatsächliche Adresse der pbt-LXC ersetzen.) Danach:

systemctl reload caddy

Caddy holt sich das TLS-Zertifikat für pbt.zisco.at automatisch über Let's Encrypt, sofern die Domain öffentlich auf die Caddy-LXC zeigt.

S
Description
No description provided
Readme
10 MiB
Languages
Python 43%
HTML 35.4%
JavaScript 21.6%