v71: переезд на lang.kube5s.ru (германская ВМ, nginx, без кубера)

This commit is contained in:
“Naeel”
2026-05-22 20:44:35 +04:00
parent 67b82c726e
commit 1baa3e841c
4 changed files with 9 additions and 21 deletions
+3 -15
View File
@@ -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 ==="
+3 -3
View File
@@ -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) {
<script>
// ---------- Глобальные переменные и инициализация ----------
const GROQ_API_KEY = '';
const VERSION = 'v70';
const VERSION = 'v71';
let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = '';
let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null;
+1 -1
View File
@@ -1,6 +1,6 @@
// ---------- Глобальные переменные и инициализация ----------
const GROQ_API_KEY = '';
const VERSION = 'v70';
const VERSION = 'v71';
let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = '';
let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null;
+2 -2
View File
@@ -12,7 +12,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
@@ -29,7 +29,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({