Standalone chatbot 'up' artık dev web UI çalıştırır (exit değil)
Browse files at this commit3d8485c2a4916bc5b38e836c008d292c83c88e82Parent: daf5582- fix
- standalone chatbot 'up' artık dev web UI çalıştırır (exit değil)
1 changed file +24 -1
- compose.yaml +24 -1
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 | 12 | services: |
| 2 | 13 | chatbot: |
| 3 | 14 | build: |
| @@ -5,4 +16,16 @@ services: | ||
| 5 | 16 | dockerfile: Containerfile |
| 6 | 17 | image: localhost/rule-based-chatbot:local |
| 7 | 18 | 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 |