diff --git a/deploy_lang.sh b/deploy_lang.sh index d7330f7..9e32280 100755 --- a/deploy_lang.sh +++ b/deploy_lang.sh @@ -9,20 +9,8 @@ KEY=$(cat ~/lang/token.txt) cp ~/lang/dist/index.html /tmp/lyngvo_index.html sed -i "s|const GROQ_API_KEY = '';|const GROQ_API_KEY = '${KEY}';|" /tmp/lyngvo_index.html -# Синхронизация всей папки lang на ВМ -rsync -az -e "ssh -i ~/.ssh/naeel_vm_id_ed25519 -o StrictHostKeyChecking=no -o ConnectTimeout=10" ~/lang/ naeel@5.172.178.213:~/terra/lang/ - -# Деплой на ВМ (index.html с ключом — через временный файл) -scp -i ~/.ssh/naeel_vm_id_ed25519 -o StrictHostKeyChecking=no -o ConnectTimeout=10 /tmp/lyngvo_index.html naeel@5.172.178.213:~/terra/lang/index.html -ssh -i ~/.ssh/naeel_vm_id_ed25519 -o StrictHostKeyChecking=no -o ConnectTimeout=10 naeel@5.172.178.213 ' - cd ~/terra/lang && \ - kubectl create configmap lyngvo-html --from-file=index.html -n default --dry-run=client -o yaml | kubectl apply -f - && \ - kubectl create configmap lyngvo-nginx --from-file=default.conf=nginx.conf -n default --dry-run=client -o yaml | kubectl apply -f - && \ - kubectl apply -f k8s/deployment.yaml && \ - kubectl apply -f k8s/ingress.yaml && \ - kubectl rollout restart deploy/lyngvo -n default && \ - kubectl rollout status deploy/lyngvo -n default --timeout=60s -' +# Деплой на германскую ВМ (nginx + Groq прокси) +scp -i ~/.ssh/vultr_openssh -o StrictHostKeyChecking=no /tmp/lyngvo_index.html root@95.179.252.111:/var/www/lyngvo/index.html rm -f /tmp/lyngvo_index.html -echo "\n=== Деплой завершён. Проверяй capire.kube5s.ru ===" +echo "\n=== Деплой завершён. Проверяй https://lang.kube5s.ru ===" diff --git a/dist/index.html b/dist/index.html index 479df76..a4b6c4f 100644 --- a/dist/index.html +++ b/dist/index.html @@ -264,7 +264,7 @@ async function transcribe(blob) { console.log('[HTTP] blob ' + (blob.size/1024).toFixed(1) + 'KB → multipart POST'); try { - const r = await fetch('https://proxy.kube5s.ru/openai/v1/audio/transcriptions', { + const r = await fetch('https://lang.kube5s.ru/openai/v1/audio/transcriptions', { method: 'POST', headers: { 'Authorization': 'Bearer ' + GROQ_API_KEY }, body: form @@ -281,7 +281,7 @@ async function transcribe(blob) { async function translateToRussian(text) { if (!GROQ_API_KEY) return; try { - const res = await fetch('https://proxy.kube5s.ru/openai/v1/chat/completions', { + const res = await fetch('https://lang.kube5s.ru/openai/v1/chat/completions', { method: 'POST', headers: { 'Authorization': `Bearer ${GROQ_API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -693,7 +693,7 @@ async function doCompare(blob, originalText, duration) {