forge
Explore
Log in

Don't you dare go Hollow

hezarfen_rule_based_chatbot

Clone
★ 0

0 watching0 forksPython1.2 MiB3c4e59dKadir Yönak3 months ago15 commits

compose.yaml117 lines, 3.4 KiBHistoryRawDownload
1# Hezarfen — tüm yığını podman ile tek komutla ayağa kaldıran orkestrasyon.
2#
3# Bu dosya deploy/ içinden çalışır; ÜÇ repo yan yana (sibling) klonlanmış olmalı:
4# <parent>/
5# ├─ hezarfen_backend/
6# ├─ hezarfen_frontend/
7# └─ Hezarfen-Rule-Based-Chatbot/ <- bu repo; compose burada (deploy/)
8#
9# podman compose -f deploy/compose.yaml up -d --build
10# (WSL2 kurulumu için: deploy/PODMAN-WSL-SETUP.md)
11#
12# Servisler:
13# surrealdb — veritabanı (iç ağ; host'a port açmaz)
14# backend — Rust API + AI köprüsü (QUIC :8090); http :8080
15# chatbot-bridge — Çelebi'yi backend'e QUIC hab/1 ile bağlayan istemci (port açmaz)
16# frontend — SolidJS + Bun, :5173 (SPA + /api proxy'si backend'e)
17
18services:
19 surrealdb:
20 image: docker.io/surrealdb/surrealdb:v3
21 container_name: hezarfen-surrealdb
22 user: "0"
23 command:
24 ["start", "--user", "root", "--pass", "root", "surrealkv:/data/hezarfen.db"]
25 volumes:
26 - surreal-data:/data
27 restart: unless-stopped
28 healthcheck:
29 test: ["CMD", "/surreal", "isready"]
30 interval: 10s
31 timeout: 5s
32 retries: 5
33 start_period: 5s
34
35 backend:
36 build:
37 context: ../../hezarfen_backend
38 dockerfile: Containerfile
39 image: localhost/hezarfen-backend:latest
40 container_name: hezarfen-backend
41 ports:
42 - "8080:8080"
43 - "8090:8090/udp"
44 environment:
45 HOST: 0.0.0.0
46 PORT: "8080"
47 DB_URL: ws://surrealdb:8000
48 DB_USER: root
49 DB_PASS: root
50 DB_NAMESPACE: hezarfen
51 DB_DATABASE: hezarfen
52 FILES_PATH: /data/files
53 RUST_LOG: info,hezarfen_backend=debug
54 ADMIN_USERNAME: admin
55 ADMIN_PASSWORD: admin123
56 AI_QUIC_ADDR: 0.0.0.0:8090
57 # Paylaşımlı/üretim ortamlarında MUTLAKA AI_SHARED_TOKEN ver (tahmin edilmesin).
58 AI_SHARED_TOKEN: ${AI_SHARED_TOKEN:-change-me}
59 volumes:
60 - hezarfen-data:/data
61 depends_on:
62 surrealdb:
63 condition: service_healthy
64 restart: unless-stopped
65 healthcheck:
66 test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8080/"]
67 interval: 30s
68 timeout: 5s
69 retries: 3
70 start_period: 10s
71
72 chatbot-bridge:
73 build:
74 context: ../../Hezarfen-Rule-Based-Chatbot
75 dockerfile: Containerfile
76 image: localhost/hezarfen-chatbot:latest
77 container_name: hezarfen-chatbot-bridge
78 init: true
79 command: ["python", "-m", "src.bridge"]
80 environment:
81 AI_BRIDGE_HOST: backend
82 AI_BRIDGE_PORT: "8090"
83 AI_BACKEND_URL: http://backend:8080
84 AI_SHARED_TOKEN: ${AI_SHARED_TOKEN:-change-me}
85 AI_TLS_SERVER_NAME: localhost
86 AI_SERVICE_NAME: celebi
87 HEZARFEN_ASSISTANT_ROLE: ogrenci
88 depends_on:
89 backend:
90 condition: service_healthy
91 restart: unless-stopped
92
93 frontend:
94 build:
95 context: ../../hezarfen_frontend
96 dockerfile: Containerfile
97 image: localhost/hezarfen-frontend:latest
98 container_name: hezarfen-frontend
99 ports:
100 - "5173:5173"
101 environment:
102 PORT: "5173"
103 BACKEND_ORIGIN: http://backend:8080
104 depends_on:
105 backend:
106 condition: service_healthy
107 restart: unless-stopped
108 healthcheck:
109 test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:5173/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
110 interval: 30s
111 timeout: 5s
112 retries: 3
113 start_period: 10s
114
115volumes:
116 hezarfen-data:
117 surreal-data: