# Hezarfen — tüm yığını podman ile tek komutla ayağa kaldıran orkestrasyon. # # Bu dosya deploy/ içinden çalışır; ÜÇ repo yan yana (sibling) klonlanmış olmalı: # / # ├─ hezarfen_backend/ # ├─ hezarfen_frontend/ # └─ Hezarfen-Rule-Based-Chatbot/ <- bu repo; compose burada (deploy/) # # podman compose -f deploy/compose.yaml up -d --build # (WSL2 kurulumu için: deploy/PODMAN-WSL-SETUP.md) # # Servisler: # surrealdb — veritabanı (iç ağ; host'a port açmaz) # backend — Rust API + AI köprüsü (QUIC :8090); http :8080 # chatbot-bridge — Çelebi'yi backend'e QUIC hab/1 ile bağlayan istemci (port açmaz) # frontend — SolidJS + Bun, :5173 (SPA + /api proxy'si backend'e) services: surrealdb: image: docker.io/surrealdb/surrealdb:v3 container_name: hezarfen-surrealdb user: "0" command: ["start", "--user", "root", "--pass", "root", "surrealkv:/data/hezarfen.db"] volumes: - surreal-data:/data restart: unless-stopped healthcheck: test: ["CMD", "/surreal", "isready"] interval: 10s timeout: 5s retries: 5 start_period: 5s backend: build: context: ../../hezarfen_backend dockerfile: Containerfile image: localhost/hezarfen-backend:latest container_name: hezarfen-backend ports: - "8080:8080" - "8090:8090/udp" environment: HOST: 0.0.0.0 PORT: "8080" DB_URL: ws://surrealdb:8000 DB_USER: root DB_PASS: root DB_NAMESPACE: hezarfen DB_DATABASE: hezarfen FILES_PATH: /data/files RUST_LOG: info,hezarfen_backend=debug ADMIN_USERNAME: admin ADMIN_PASSWORD: admin123 AI_QUIC_ADDR: 0.0.0.0:8090 # Paylaşımlı/üretim ortamlarında MUTLAKA AI_SHARED_TOKEN ver (tahmin edilmesin). AI_SHARED_TOKEN: ${AI_SHARED_TOKEN:-change-me} volumes: - hezarfen-data:/data depends_on: surrealdb: condition: service_healthy restart: unless-stopped healthcheck: test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8080/"] interval: 30s timeout: 5s retries: 3 start_period: 10s chatbot-bridge: build: context: ../../Hezarfen-Rule-Based-Chatbot dockerfile: Containerfile image: localhost/hezarfen-chatbot:latest container_name: hezarfen-chatbot-bridge init: true command: ["python", "-m", "src.bridge"] environment: AI_BRIDGE_HOST: backend AI_BRIDGE_PORT: "8090" AI_BACKEND_URL: http://backend:8080 AI_SHARED_TOKEN: ${AI_SHARED_TOKEN:-change-me} AI_TLS_SERVER_NAME: localhost AI_SERVICE_NAME: celebi HEZARFEN_ASSISTANT_ROLE: ogrenci depends_on: backend: condition: service_healthy restart: unless-stopped frontend: build: context: ../../hezarfen_frontend dockerfile: Containerfile image: localhost/hezarfen-frontend:latest container_name: hezarfen-frontend ports: - "5173:5173" environment: PORT: "5173" BACKEND_ORIGIN: http://backend:8080 depends_on: backend: condition: service_healthy restart: unless-stopped healthcheck: test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:5173/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 30s timeout: 5s retries: 3 start_period: 10s volumes: hezarfen-data: surreal-data: