forge
Explore
Log in

Don't you dare go Hollow

🔧 name the stack after the repo and fix the backend host

Browse files at this commit

2ddc9e87a2e2085eb42133b13e0d978da24701a7Ahmet Kaan GümüşParent: e013725
  • refactor
    • 🔧 name the stack after the repo and fix the backend host
Show full message
refactor: 🔧 name the stack after the repo and fix the backend host
- every runtime name follows the repo: image hezarfen_rule_based_chatbot,
  container_name, the systemd unit hezarfen_rule_based_chatbot_compose, the
  operator file hezarfen_rule_based_chatbot.env, the deploy dir and the
  release artifact
- AI_BRIDGE_HOST/AI_BACKEND_URL now use hezarfen_backend: the hyphenated
  name does not resolve on the shared podman network (proved inside the
  container: getaddrinfo("hezarfen-backend") fails, hezarfen_backend and
  backend both point at 10.89.0.4)
- AI_BACKEND_URL points at the backend's real port 7656 instead of 8080
.github/workflows/main.ymlmodified+27 -27
@@ -27,7 +27,7 @@
27 # frontend deploy'unun kullandığı üç isim;27 # frontend deploy'unun kullandığı üç isim;
28 # * sunucuda `loginctl enable-linger <user>` (kullanıcı unit'leri için);28 # * sunucuda `loginctl enable-linger <user>` (kullanıcı unit'leri için);
29 # * sunucuda podman + bir compose sağlayıcı (deploy ikisini de kontrol eder);29 # * sunucuda podman + bir compose sağlayıcı (deploy ikisini de kontrol eder);
30-# * operatörün ~/hezarfen_chatbot/hezarfen_chatbot.env (0600) dosyası;30+# * operatörün ~/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env (0600) dosyası;
31 # * BACKEND tarafı açık olmalı: hezarfen_backend.env içinde31 # * BACKEND tarafı açık olmalı: hezarfen_backend.env içinde
32 # AI_QUIC_ADDR=0.0.0.0:8090 ve AI_SHARED_TOKEN bu köprününkiyle AYNI.32 # AI_QUIC_ADDR=0.0.0.0:8090 ve AI_SHARED_TOKEN bu köprününkiyle AYNI.
33 # (127.0.0.1 yazılıysa backend yalnız kendi loopback'ine bağlanır ve köprü33 # (127.0.0.1 yazılıysa backend yalnız kendi loopback'ine bağlanır ve köprü
@@ -46,13 +46,13 @@ on:
46 # VPS değişimine dokunmadan bayat Validate/Build'i iptal edebilmeli.46 # VPS değişimine dokunmadan bayat Validate/Build'i iptal edebilmeli.
47 47
48 env:48 env:
49- # systemd kullanıcı unit'i. Bkz. deploy/hezarfen_chatbot_compose.service.49+ # systemd kullanıcı unit'i. Bkz. deploy/hezarfen_rule_based_chatbot_compose.service.
50- SERVICE: hezarfen_chatbot_compose50+ SERVICE: hezarfen_rule_based_chatbot_compose
51 # Deploy, SSH kullanıcısının home'u altındaki bu alt dizinde yaşar ($HOME51 # Deploy, SSH kullanıcısının home'u altındaki bu alt dizinde yaşar ($HOME
52 # sunucuda çözülür, yani kullanıcı değişince yol da onunla gelir).52 # sunucuda çözülür, yani kullanıcı değişince yol da onunla gelir).
53- DEPLOY_SUBDIR: hezarfen_chatbot53+ DEPLOY_SUBDIR: hezarfen_rule_based_chatbot
54 # Köprünün ayar dosyası; deploy yalnız varlığını kontrol eder, yazmaz.54 # Köprünün ayar dosyası; deploy yalnız varlığını kontrol eder, yazmaz.
55- ENV_FILE_NAME: hezarfen_chatbot.env55+ ENV_FILE_NAME: hezarfen_rule_based_chatbot.env
56 # Sağlık kapısı: backend'in verdiği kayıt onayı logda bu satırdır.56 # Sağlık kapısı: backend'in verdiği kayıt onayı logda bu satırdır.
57 READY_MARKER: "kayıt başarılı"57 READY_MARKER: "kayıt başarılı"
58 # Köprünün backend sertifikasını çektiği yol (HTTP, backend konteynerinin portu).58 # Köprünün backend sertifikasını çektiği yol (HTTP, backend konteynerinin portu).
@@ -111,20 +111,20 @@ jobs:
111 - name: Build the image111 - name: Build the image
112 run: |112 run: |
113 set -euo pipefail113 set -euo pipefail
114- docker build -f Containerfile -t localhost/hezarfen_chatbot:$GITHUB_SHA .114+ docker build -f Containerfile -t localhost/hezarfen_rule_based_chatbot:$GITHUB_SHA .
115 115
116 - name: Stage the release bundle116 - name: Stage the release bundle
117 run: |117 run: |
118 set -euo pipefail118 set -euo pipefail
119 mkdir -p stage119 mkdir -p stage
120- docker save localhost/hezarfen_chatbot:$GITHUB_SHA | gzip > stage/hezarfen_chatbot.tar.gz120+ docker save localhost/hezarfen_rule_based_chatbot:$GITHUB_SHA | gzip > stage/hezarfen_rule_based_chatbot.tar.gz
121- cp compose.yaml deploy/hezarfen_chatbot_compose.service stage/121+ cp compose.yaml deploy/hezarfen_rule_based_chatbot_compose.service stage/
122 echo -n "$GITHUB_SHA" > stage/tag122 echo -n "$GITHUB_SHA" > stage/tag
123 # Sunucuda kurulacak her şey burada olmalı; eksik parça burada,123 # Sunucuda kurulacak her şey burada olmalı; eksik parça burada,
124 # sunucuda değil, patlar.124 # sunucuda değil, patlar.
125- test -f stage/hezarfen_chatbot.tar.gz125+ test -f stage/hezarfen_rule_based_chatbot.tar.gz
126 test -f stage/compose.yaml126 test -f stage/compose.yaml
127- test -f stage/hezarfen_chatbot_compose.service127+ test -f stage/hezarfen_rule_based_chatbot_compose.service
128 test -f stage/tag128 test -f stage/tag
129 ls -l stage129 ls -l stage
130 130
@@ -199,9 +199,9 @@ jobs:
199 - name: Check the release is complete199 - name: Check the release is complete
200 run: |200 run: |
201 set -euo pipefail201 set -euo pipefail
202- test -f stage/hezarfen_chatbot.tar.gz202+ test -f stage/hezarfen_rule_based_chatbot.tar.gz
203 test -f stage/compose.yaml203 test -f stage/compose.yaml
204- test -f stage/hezarfen_chatbot_compose.service204+ test -f stage/hezarfen_rule_based_chatbot_compose.service
205 test -f stage/tag205 test -f stage/tag
206 206
207 - name: Install SSH keys207 - name: Install SSH keys
@@ -227,14 +227,14 @@ jobs:
227 ;;227 ;;
228 esac228 esac
229 deploy_path=$HOME/$1229 deploy_path=$HOME/$1
230- # Bu dizin operatörün hezarfen_chatbot.env dosyasını, compose230+ # Bu dizin operatörün hezarfen_rule_based_chatbot.env dosyasını, compose
231 # dosyalarını ve tag dosyalarını tutar; hiçbiri toptan silinmez.231 # dosyalarını ve tag dosyalarını tutar; hiçbiri toptan silinmez.
232 mkdir -p -- "$deploy_path"232 mkdir -p -- "$deploy_path"
233 REMOTE233 REMOTE
234 # stdin paketi taşıyor, betik taşıyamaz; çıkarma yine bash -c ile234 # stdin paketi taşıyor, betik taşıyamaz; çıkarma yine bash -c ile
235 # çünkü login shell bash değil ve $HOME'u genişletmez. Sunucuya235 # çünkü login shell bash değil ve $HOME'u genişletmez. Sunucuya
236 # yalnız dört deploy dosyası kurulur.236 # yalnız dört deploy dosyası kurulur.
237- tar -C stage -czf - hezarfen_chatbot.tar.gz compose.yaml hezarfen_chatbot_compose.service tag | ssh "$ssh_target" "bash -c 'exec tar -xzf - -C \"\$HOME/\$1\"' -- '$DEPLOY_SUBDIR'"237+ tar -C stage -czf - hezarfen_rule_based_chatbot.tar.gz compose.yaml hezarfen_rule_based_chatbot_compose.service tag | ssh "$ssh_target" "bash -c 'exec tar -xzf - -C \"\$HOME/\$1\"' -- '$DEPLOY_SUBDIR'"
238 238
239 - name: Load the image and restart the bridge239 - name: Load the image and restart the bridge
240 run: |240 run: |
@@ -258,10 +258,10 @@ jobs:
258 258
259 # Hiçbir şey oynamadan önce oku: ayar dosyası operatörün, sunucuda,259 # Hiçbir şey oynamadan önce oku: ayar dosyası operatörün, sunucuda,
260 # elle bir kez yazılır (anahtarlar için bkz.260 # elle bir kez yazılır (anahtarlar için bkz.
261- # deploy/hezarfen_chatbot.env.example). Deploy onu asla oluşturmaz,261+ # deploy/hezarfen_rule_based_chatbot.env.example). Deploy onu asla oluşturmaz,
262 # ezmez.262 # ezmez.
263 if [ ! -f "$env_file" ]; then263 if [ ! -f "$env_file" ]; then
264- echo "missing $env_file — create it (0600) from deploy/hezarfen_chatbot.env.example" >&2264+ echo "missing $env_file — create it (0600) from deploy/hezarfen_rule_based_chatbot.env.example" >&2
265 exit 1265 exit 1
266 fi266 fi
267 chmod 0600 -- "$env_file"267 chmod 0600 -- "$env_file"
@@ -290,7 +290,7 @@ jobs:
290 290
291 # BU build'in imajını yükle ve build'in damgaladığı tag'i oku291 # BU build'in imajını yükle ve build'in damgaladığı tag'i oku
292 # (build zamanı ile deploy zamanı neyin gittiğinde anlaşmalı).292 # (build zamanı ile deploy zamanı neyin gittiğinde anlaşmalı).
293- gunzip -c "$deploy_path/hezarfen_chatbot.tar.gz" | podman load293+ gunzip -c "$deploy_path/hezarfen_rule_based_chatbot.tar.gz" | podman load
294 tag=$(cat -- "$deploy_path/tag")294 tag=$(cat -- "$deploy_path/tag")
295 295
296 # Tag rotasyonu: previous_tag geri dönüş hedefidir (ilk deploy'da296 # Tag rotasyonu: previous_tag geri dönüş hedefidir (ilk deploy'da
@@ -305,9 +305,9 @@ jobs:
305 # kazanan yapar.305 # kazanan yapar.
306 printf 'HEZARFEN_TAG=%s\n' "$tag" > "$deploy_path/stack.env"306 printf 'HEZARFEN_TAG=%s\n' "$tag" > "$deploy_path/stack.env"
307 307
308- chmod 0644 -- "$deploy_path/compose.yaml" "$deploy_path/hezarfen_chatbot_compose.service"308+ chmod 0644 -- "$deploy_path/compose.yaml" "$deploy_path/hezarfen_rule_based_chatbot_compose.service"
309 # İmaj tarball'ı yalnız taşıyıcıydı; imaj artık podman deposunda.309 # İmaj tarball'ı yalnız taşıyıcıydı; imaj artık podman deposunda.
310- rm -f -- "$deploy_path/hezarfen_chatbot.tar.gz"310+ rm -f -- "$deploy_path/hezarfen_rule_based_chatbot.tar.gz"
311 311
312 compose_up() {312 compose_up() {
313 podman compose --env-file "$env_file" --env-file "$deploy_path/stack.env" up -d --no-build313 podman compose --env-file "$env_file" --env-file "$deploy_path/stack.env" up -d --no-build
@@ -330,7 +330,7 @@ jobs:
330 # Unit sürümle birlikte gelir: yeni kurulmuş bir kutuda ilk deploy'a330 # Unit sürümle birlikte gelir: yeni kurulmuş bir kutuda ilk deploy'a
331 # kadar unit yoktur ve değişen unit onu gerektiren compose ile iner.331 # kadar unit yoktur ve değişen unit onu gerektiren compose ile iner.
332 mkdir -p -- "$HOME/.config/systemd/user"332 mkdir -p -- "$HOME/.config/systemd/user"
333- install -m 0644 -- "$deploy_path/hezarfen_chatbot_compose.service" "$HOME/.config/systemd/user/$service.service"333+ install -m 0644 -- "$deploy_path/hezarfen_rule_based_chatbot_compose.service" "$HOME/.config/systemd/user/$service.service"
334 systemctl --user daemon-reload334 systemctl --user daemon-reload
335 335
336 # Unit RemainAfterExit'li bir oneshot: aktif (exited) unit'te `start`336 # Unit RemainAfterExit'li bir oneshot: aktif (exited) unit'te `start`
@@ -346,7 +346,7 @@ jobs:
346 # yeniden bağlanma aralıkları zaman alır.346 # yeniden bağlanma aralıkları zaman alır.
347 ready_ok=0347 ready_ok=0
348 for _ in $(seq 1 60); do348 for _ in $(seq 1 60); do
349- if podman logs --tail 200 hezarfen_chatbot 2>&1 | grep -q "$ready_marker"; then349+ if podman logs --tail 200 hezarfen_rule_based_chatbot 2>&1 | grep -q "$ready_marker"; then
350 ready_ok=1350 ready_ok=1
351 break351 break
352 fi352 fi
@@ -354,14 +354,14 @@ jobs:
354 done354 done
355 if [ "$ready_ok" -ne 1 ]; then355 if [ "$ready_ok" -ne 1 ]; then
356 echo "the bridge never registered with the backend ('$ready_marker' missing); rolling back" >&2356 echo "the bridge never registered with the backend ('$ready_marker' missing); rolling back" >&2
357- podman logs --tail 30 hezarfen_chatbot 2>&1 >&2 || true357+ podman logs --tail 30 hezarfen_rule_based_chatbot 2>&1 >&2 || true
358 rollback358 rollback
359 exit 1359 exit 1
360 fi360 fi
361 361
362 # Eski bir stack de cevap verebilir; çalışan konteyner BU build'in362 # Eski bir stack de cevap verebilir; çalışan konteyner BU build'in
363 # imajı olmalı, yoksa geri dönülür.363 # imajı olmalı, yoksa geri dönülür.
364- image=$(podman inspect -f '{{.Config.Image}}' hezarfen_chatbot)364+ image=$(podman inspect -f '{{.Config.Image}}' hezarfen_rule_based_chatbot)
365 case "$image" in365 case "$image" in
366 *"$tag"*) ;;366 *"$tag"*) ;;
367 *)367 *)
@@ -370,7 +370,7 @@ jobs:
370 exit 1370 exit 1
371 ;;371 ;;
372 esac372 esac
373- echo 'hezarfen_chatbot_compose is up'373+ echo 'hezarfen_rule_based_chatbot_compose is up'
374 REMOTE374 REMOTE
375 375
376 # Bağımsız son kontrol: cevap veren konteyner hâlâ güncel tag'in olmalı ve376 # Bağımsız son kontrol: cevap veren konteyner hâlâ güncel tag'in olmalı ve
@@ -386,7 +386,7 @@ jobs:
386 export XDG_RUNTIME_DIR=/run/user/$(id -u)386 export XDG_RUNTIME_DIR=/run/user/$(id -u)
387 cd -- "$deploy_path"387 cd -- "$deploy_path"
388 tag=$(cat -- "$deploy_path/current_tag")388 tag=$(cat -- "$deploy_path/current_tag")
389- image=$(podman inspect -f '{{.Config.Image}}' hezarfen_chatbot)389+ image=$(podman inspect -f '{{.Config.Image}}' hezarfen_rule_based_chatbot)
390 case "$image" in390 case "$image" in
391 *"$tag"*) ;;391 *"$tag"*) ;;
392 *)392 *)
@@ -394,9 +394,9 @@ jobs:
394 exit 1394 exit 1
395 ;;395 ;;
396 esac396 esac
397- status=$(podman inspect -f '{{.State.Status}}' hezarfen_chatbot)397+ status=$(podman inspect -f '{{.State.Status}}' hezarfen_rule_based_chatbot)
398 [ "$status" = "running" ] || { echo "container status is '$status', not running" >&2; exit 1; }398 [ "$status" = "running" ] || { echo "container status is '$status', not running" >&2; exit 1; }
399- podman logs --tail 200 hezarfen_chatbot 2>&1 | grep -q "$ready_marker" || {399+ podman logs --tail 200 hezarfen_rule_based_chatbot 2>&1 | grep -q "$ready_marker" || {
400 echo "the bridge is not registered with the backend" >&2400 echo "the bridge is not registered with the backend" >&2
401 exit 1401 exit 1
402 }402 }
.gitignoremodified+3 -3
@@ -23,10 +23,10 @@ data/stress_benchmark_results.jsonl
23 # Okunabilir Markdown raporu repoda tutulur; ham JSON tutulmaz.23 # Okunabilir Markdown raporu repoda tutulur; ham JSON tutulmaz.
24 data/benchmark_results.json24 data/benchmark_results.json
25 25
26-# Compose/sistem ortam dosyaları: operatörün ayarları (hezarfen_chatbot.env) ve26+# Compose/sistem ortam dosyaları: operatörün ayarları (hezarfen_rule_based_chatbot.env) ve
27 # deploy sahipli tag taşıyıcısı (stack.env) makineye özeldir, git'e girmez.27 # deploy sahipli tag taşıyıcısı (stack.env) makineye özeldir, git'e girmez.
28-# Şablon: deploy/hezarfen_chatbot.env.example28+# Şablon: deploy/hezarfen_rule_based_chatbot.env.example
29-hezarfen_chatbot.env29+hezarfen_rule_based_chatbot.env
30 stack.env30 stack.env
31 31
32 # CI deploy paketi (imaj tarball'ı + compose dosyaları + tag).32 # CI deploy paketi (imaj tarball'ı + compose dosyaları + tag).
Containerfilemodified+3 -3
@@ -20,15 +20,15 @@ RUN useradd --create-home --uid 10001 chatbot \
20 USER chatbot20 USER chatbot
21 21
22 # Dağıtım varsayılanları — TEK yazıldıkları yer. Sunucu bunları22 # Dağıtım varsayılanları — TEK yazıldıkları yer. Sunucu bunları
23-# hezarfen_chatbot.env (env_file) ile ezer; compose dosyası hiçbir anahtar23+# hezarfen_rule_based_chatbot.env (env_file) ile ezer; compose dosyası hiçbir anahtar
24 # listelemez, böylece operatörün dosyası gölgelenemez.24 # listelemez, böylece operatörün dosyası gölgelenemez.
25 #25 #
26 # AI_BACKEND_URL köprünün sertifikayı çektiği HTTP kökü: backend konteynerinin26 # AI_BACKEND_URL köprünün sertifikayı çektiği HTTP kökü: backend konteynerinin
27 # kendi portu (compose'da PORT=7656). Sertifika her (yeniden) bağlanmada27 # kendi portu (compose'da PORT=7656). Sertifika her (yeniden) bağlanmada
28 # tazelenir.28 # tazelenir.
29-ENV AI_BRIDGE_HOST=hezarfen-backend \29+ENV AI_BRIDGE_HOST=hezarfen_backend \
30 AI_BRIDGE_PORT=8090 \30 AI_BRIDGE_PORT=8090 \
31- AI_BACKEND_URL=http://hezarfen-backend:7656 \31+ AI_BACKEND_URL=http://hezarfen_backend:7656 \
32 AI_SHARED_TOKEN=change-me \32 AI_SHARED_TOKEN=change-me \
33 AI_TLS_SERVER_NAME=localhost \33 AI_TLS_SERVER_NAME=localhost \
34 AI_SERVICE_NAME=celebi \34 AI_SERVICE_NAME=celebi \
ReadMe.mdmodified+1 -1
@@ -135,7 +135,7 @@ podman compose up -d --build # yalnız hezarfen-chatbot-bridge
135 ```135 ```
136 136
137 Ürün compose'u demo HTTP sunucusunu çalıştırmaz ve hostta `8000/8001` portu137 Ürün compose'u demo HTTP sunucusunu çalıştırmaz ve hostta `8000/8001` portu
138-açmaz. Chatbot container'ı backend ağı içinde `hezarfen-backend:8090` hedefine138+açmaz. Chatbot container'ı backend ağı içinde `hezarfen_backend:8090` hedefine
139 **QUIC/UDP** ile bağlanır; `8090` için TCP bağlantısı veya host port yayını yoktur.139 **QUIC/UDP** ile bağlanır; `8090` için TCP bağlantısı veya host port yayını yoktur.
140 `src.web` yalnız yerel geliştirici aracıdır ve ürün yığınının parçası değildir.140 `src.web` yalnız yerel geliştirici aracıdır ve ürün yığınının parçası değildir.
141 141
compose.yamlmodified+5 -5
@@ -1,11 +1,11 @@
1 # Çelebi QUIC köprüsü — bu compose yalnızca TEK chatbot container'ı oluşturur.1 # Çelebi QUIC köprüsü — bu compose yalnızca TEK chatbot container'ı oluşturur.
2 # Backend compose ayakta olmalı; bu servis backend'in ağına katılır ve oradan2 # Backend compose ayakta olmalı; bu servis backend'in ağına katılır ve oradan
3-# QUIC/UDP ile `hezarfen-backend:8090` adresine dial-in eder. Host portu veya3+# QUIC/UDP ile `hezarfen_backend:8090` adresine dial-in eder. Host portu veya
4 # demo web arayüzü AÇMAZ (web.py yalnız geliştirici aracıdır).4 # demo web arayüzü AÇMAZ (web.py yalnız geliştirici aracıdır).
5 #5 #
6 # Varsayılanların TEK kaynağı Containerfile'ın ENV bloğudur; bu dosya hiçbir6 # Varsayılanların TEK kaynağı Containerfile'ın ENV bloğudur; bu dosya hiçbir
7 # `environment:` girdisi taşımaz, böylece hiçbir şey operatörün dosyasını7 # `environment:` girdisi taşımaz, böylece hiçbir şey operatörün dosyasını
8-# gölgeleyemez. Sunucuda ~/hezarfen_chatbot/hezarfen_chatbot.env ile ezilir.8+# gölgeleyemez. Sunucuda ~/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env ile ezilir.
9 #9 #
10 # podman compose up -d --build10 # podman compose up -d --build
11 #11 #
@@ -19,12 +19,12 @@ services:
19 context: .19 context: .
20 dockerfile: Containerfile20 dockerfile: Containerfile
21 # HEZARFEN_TAG deploy tarafından yazılan stack.env'den gelir (--env-file).21 # HEZARFEN_TAG deploy tarafından yazılan stack.env'den gelir (--env-file).
22- image: localhost/hezarfen_chatbot:${HEZARFEN_TAG:-latest}22+ image: localhost/hezarfen_rule_based_chatbot:${HEZARFEN_TAG:-latest}
23- container_name: hezarfen_chatbot23+ container_name: hezarfen_rule_based_chatbot
24 init: true24 init: true
25 env_file:25 env_file:
26 # Sunucuda elle yazılır (0600); laptopta yoktur.26 # Sunucuda elle yazılır (0600); laptopta yoktur.
27- - path: hezarfen_chatbot.env27+ - path: hezarfen_rule_based_chatbot.env
28 required: false28 required: false
29 restart: unless-stopped29 restart: unless-stopped
30 networks:30 networks:
deploy/hezarfen_chatbot.env.example → deploy/hezarfen_rule_based_chatbot.env.examplerenamed+7 -7
@@ -1,10 +1,10 @@
1-# hezarfen_chatbot.env — Çelebi köprüsünün sunucu ayarları.1+# hezarfen_rule_based_chatbot.env — Çelebi köprüsünün sunucu ayarları.
2 #2 #
3 # Sunucuda TEK SEFERLİK, elle:3 # Sunucuda TEK SEFERLİK, elle:
4-# mkdir -p ~/hezarfen_chatbot4+# mkdir -p ~/hezarfen_rule_based_chatbot
5-# cp hezarfen_chatbot.env.example ~/hezarfen_chatbot/hezarfen_chatbot.env5+# cp hezarfen_rule_based_chatbot.env.example ~/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env
6 # <değerleri doldur>6 # <değerleri doldur>
7-# chmod 0600 ~/hezarfen_chatbot/hezarfen_chatbot.env7+# chmod 0600 ~/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env
8 #8 #
9 # Hiçbir otomasyon bu dosyayı oluşturmaz, ezmez, yüklemez — operatörün malıdır;9 # Hiçbir otomasyon bu dosyayı oluşturmaz, ezmez, yüklemez — operatörün malıdır;
10 # compose yalnız okur (`env_file`). Satırlar düz KEY=value: tırnak yok, `export`10 # compose yalnız okur (`env_file`). Satırlar düz KEY=value: tırnak yok, `export`
@@ -12,7 +12,7 @@
12 #12 #
13 # Buradaki her anahtar Containerfile ENV bloğundaki varsayılanı EZER. Değerler13 # Buradaki her anahtar Containerfile ENV bloğundaki varsayılanı EZER. Değerler
14 # konteyner BAŞLARKEN okunur: değişiklikten sonra yeniden oluştur14 # konteyner BAŞLARKEN okunur: değişiklikten sonra yeniden oluştur
15-# (`podman compose up -d` ya da `systemctl --user restart hezarfen_chatbot_compose`).15+# (`podman compose up -d` ya da `systemctl --user restart hezarfen_rule_based_chatbot_compose`).
16 16
17 # ── Backend tarafı (ZORUNLU: ikisi backend ile aynı olmalı) ───────────────────17 # ── Backend tarafı (ZORUNLU: ikisi backend ile aynı olmalı) ───────────────────
18 # Backend'in QUIC köprüsü dinleyicisi. hezarfen_backend.env içinde18 # Backend'in QUIC köprüsü dinleyicisi. hezarfen_backend.env içinde
@@ -20,11 +20,11 @@
20 # konteyner loopback'ine bağlanır ve HİÇBİR servis dial-in edemez (Çelebi 50320 # konteyner loopback'ine bağlanır ve HİÇBİR servis dial-in edemez (Çelebi 503
21 # "no AI service is connected" verir). Değiştirdikten sonra:21 # "no AI service is connected" verir). Değiştirdikten sonra:
22 # systemctl --user restart hezarfen_backend_compose22 # systemctl --user restart hezarfen_backend_compose
23-AI_BRIDGE_HOST=hezarfen-backend23+AI_BRIDGE_HOST=hezarfen_backend
24 AI_BRIDGE_PORT=809024 AI_BRIDGE_PORT=8090
25 25
26 # Sertifikanın çekildiği HTTP kökü — backend konteynerinin kendi portu.26 # Sertifikanın çekildiği HTTP kökü — backend konteynerinin kendi portu.
27-AI_BACKEND_URL=http://hezarfen-backend:765627+AI_BACKEND_URL=http://hezarfen_backend:7656
28 28
29 # Paylaşılan sır: backend'in AI_SHARED_TOKEN'ı ile BİREBİR aynı olmalı.29 # Paylaşılan sır: backend'in AI_SHARED_TOKEN'ı ile BİREBİR aynı olmalı.
30 # 'change-me' yalnız geliştirme değeridir; prod'da iki tarafı birlikte değiştir.30 # 'change-me' yalnız geliştirme değeridir; prod'da iki tarafı birlikte değiştir.
deploy/hezarfen_chatbot_compose.service → deploy/hezarfen_rule_based_chatbot_compose.servicerenamed+6 -6
@@ -1,7 +1,7 @@
1 # systemd KULLANICI unit'i: Çelebi köprüsünü podman compose ile çalıştırır.1 # systemd KULLANICI unit'i: Çelebi köprüsünü podman compose ile çalıştırır.
2-# %h/hezarfen_chatbot içinde beklenen dosyalar:2+# %h/hezarfen_rule_based_chatbot içinde beklenen dosyalar:
3 # compose.yaml bu repodan (ya da deploy artefaktından)3 # compose.yaml bu repodan (ya da deploy artefaktından)
4-# hezarfen_chatbot.env 0600, deploy/hezarfen_chatbot.env.example'dan4+# hezarfen_rule_based_chatbot.env 0600, deploy/hezarfen_rule_based_chatbot.env.example'dan
5 # ELLE yazılır — otomasyon oluşturmaz/ezmez5 # ELLE yazılır — otomasyon oluşturmaz/ezmez
6 # stack.env deploy sahipli; HEZARFEN_TAG taşır6 # stack.env deploy sahipli; HEZARFEN_TAG taşır
7 #7 #
@@ -9,7 +9,7 @@
9 # podman compose build # burada derle9 # podman compose build # burada derle
10 # podman load -i image.tar # ya da hazır imajı yükle10 # podman load -i image.tar # ya da hazır imajı yükle
11 #11 #
12-# hezarfen_chatbot.env içindeki anahtarlar (tam belge: deploy/hezarfen_chatbot.env.example).12+# hezarfen_rule_based_chatbot.env içindeki anahtarlar (tam belge: deploy/hezarfen_rule_based_chatbot.env.example).
13 # Hepsinin varsayılanı imajın ENV bloğundadır (Containerfile) — bu dosya ezer:13 # Hepsinin varsayılanı imajın ENV bloğundadır (Containerfile) — bu dosya ezer:
14 # AI_BRIDGE_HOST / AI_BRIDGE_PORT backend'in QUIC dinleyicisi (ağ içi ad)14 # AI_BRIDGE_HOST / AI_BRIDGE_PORT backend'in QUIC dinleyicisi (ağ içi ad)
15 # AI_BACKEND_URL sertifikanın çekildiği HTTP kökü15 # AI_BACKEND_URL sertifikanın çekildiği HTTP kökü
@@ -18,7 +18,7 @@
18 #18 #
19 # Sadece ortam değişkeni değiştiğinde yeniden başlatma (ExecStart'ı yeniden19 # Sadece ortam değişkeni değiştiğinde yeniden başlatma (ExecStart'ı yeniden
20 # koşar, ortamı değişen konteynerı yeniden oluşturur):20 # koşar, ortamı değişen konteynerı yeniden oluşturur):
21-# systemctl --user restart hezarfen_chatbot_compose21+# systemctl --user restart hezarfen_rule_based_chatbot_compose
22 22
23 [Unit]23 [Unit]
24 Description=Hezarfen Celebi QUIC bridge (rule-based chatbot)24 Description=Hezarfen Celebi QUIC bridge (rule-based chatbot)
@@ -28,10 +28,10 @@ Wants=network-online.target
28 [Service]28 [Service]
29 Type=oneshot29 Type=oneshot
30 RemainAfterExit=yes30 RemainAfterExit=yes
31-WorkingDirectory=%h/hezarfen_chatbot31+WorkingDirectory=%h/hezarfen_rule_based_chatbot
32 # Sonraki --env-file çakışan anahtarda kazanır: önce operatörün ayar dosyası,32 # Sonraki --env-file çakışan anahtarda kazanır: önce operatörün ayar dosyası,
33 # sonra deploy sahipli stack.env (HEZARFEN_TAG).33 # sonra deploy sahipli stack.env (HEZARFEN_TAG).
34-ExecStart=/usr/bin/podman compose --env-file %h/hezarfen_chatbot/hezarfen_chatbot.env --env-file %h/hezarfen_chatbot/stack.env up -d --no-build34+ExecStart=/usr/bin/podman compose --env-file %h/hezarfen_rule_based_chatbot/hezarfen_rule_based_chatbot.env --env-file %h/hezarfen_rule_based_chatbot/stack.env up -d --no-build
35 # -v yok: isimli volume'lar stop'ta yaşamalı (köprü durumsuzdur ama şekil aynı).35 # -v yok: isimli volume'lar stop'ta yaşamalı (köprü durumsuzdur ama şekil aynı).
36 ExecStop=/usr/bin/podman compose down36 ExecStop=/usr/bin/podman compose down
37 TimeoutStartSec=18037 TimeoutStartSec=180