forge
Explore
Log in

Don't you dare go Hollow

Standalone chatbot 'up' artık dev web UI çalıştırır (exit değil)

Browse files at this commit

3d8485c2a4916bc5b38e836c008d292c83c88e82Kadir YönakParent: daf5582
  • fix
    • standalone chatbot 'up' artık dev web UI çalıştırır (exit değil)
Show full message
fix(compose): standalone chatbot 'up' artık dev web UI çalıştırır (exit değil)

Sorun: 'podman compose up' chatbot reposunda container'ı 'python -m src.main --validate'
ile başlatıyordu -> katalog doğrulanıp exit 0 ile çıkıyordu ('sürekli exit'). Bu bir
podman hatası değil; --validate tek-seferlik komut.

Çözüm: command -> 'python -m src.web --host 0.0.0.0 --port 8000' (uzun-çalışan dev
sohbet arayüzü) + port 8000:8000 + healthcheck + restart. Artık 'up' deyince
http://localhost:8000 açık kalır. Tam ürün için kök compose (README/başlık notu).
compose.yamlmodified+24 -1
@@ -1,3 +1,14 @@
1+# Çelebi kural-tabanlı chatbot — TEK BAŞINA (standalone) çalıştırma.
2+#
3+# podman compose up --build -> http://localhost:8000 (geliştirici sohbet arayüzü)
4+#
5+# Not: Bu compose chatbot'u TEK BAŞINA (backend olmadan) çalıştırır — offline motoru
6+# denemek için dev web arayüzü açar ve AÇIK KALIR. Backend'e bağlı QUIC köprüsü ve
7+# tam ürün (backend + frontend + surrealdb) için KÖK dizindeki compose'u kullan:
8+# cd .. && podman compose up -d --build
9+#
10+# Yalnızca katalog doğrulaması (tek-seferlik, çıkar) istersen:
11+# podman compose run --rm chatbot python -m src.main --validate
1 services:12 services:
2 chatbot:13 chatbot:
3 build:14 build:
@@ -5,4 +16,16 @@ services:
5 dockerfile: Containerfile16 dockerfile: Containerfile
6 image: localhost/rule-based-chatbot:local17 image: localhost/rule-based-chatbot:local
7 init: true18 init: true
8- command: ["python", "-m", "src.main", "--validate"]19+ # Uzun-çalışan servis: geliştirici web arayüzü. Container içinde host'tan
20+ # erişilebilmesi için 0.0.0.0'a bind eder.
21+ command: ["python", "-m", "src.web", "--host", "0.0.0.0", "--port", "8000"]
22+ ports:
23+ - "8000:8000"
24+ restart: unless-stopped
25+ healthcheck:
26+ test: ["CMD", "python", "-c",
27+ "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/')"]
28+ interval: 30s
29+ timeout: 5s
30+ retries: 3
31+ start_period: 5s