From a46925fce9c794a336e90a1e8dd6cb89ac5dd08166a31209fbe05ad485732c83 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Sun, 19 Jul 2026 18:19:36 -0400 Subject: [PATCH] hore --- build.ipynb | 77 ++++++++++++++++++++++++++++++++++++++++++++++-- k8s/stunnel.yaml | 3 -- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/build.ipynb b/build.ipynb index 51ddc5c..11af7b7 100644 --- a/build.ipynb +++ b/build.ipynb @@ -355,7 +355,7 @@ "metadata": {}, "outputs": [], "source": [ - "!echo \"kubectl create secret docker-registry regcred --docker-server=$REGISTRY_HOST --docker-username='user' --docker-password=$REGISTRY_PASS --docker-email=\\\"$(git config --global --get user.email)\\\"\"" + "!echo \"kubectl create secret docker-registry regcred --docker-server=$REGISTRY_HOST --docker-username='user' --docker-password=$REGISTRY_PASS --docker-email=\\\"$(git config --global --get user.email)\\\" && clear && history -c\"" ] }, { @@ -368,7 +368,9 @@ "!echo \"kubectl apply -f - <<'EOF'\"\n", "!echo \"$(envsubst < k8s/tg.yaml)\"\n", "!echo \"EOF\"\n", - "!echo \"\"\n" + "!echo \"clear\"\n", + "!echo \"history -c\"\n", + "!echo \"\"" ] }, { @@ -386,7 +388,76 @@ "metadata": {}, "outputs": [], "source": [ - "!rsync -avz ./static kultmost:/var/www/static/" + "#!rsync -avz ./static kultmost:/var/www/static/" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3aba3afb", + "metadata": {}, + "outputs": [], + "source": [ + "!rsync -avh --exclude-from=.rsyncignore . /app/" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "11c03751", + "metadata": {}, + "outputs": [], + "source": [ + "!rsync -avh --exclude-from=.rsyncignore --exclude=.venv/ /app/ kultmost:/app/" + ] + }, + { + "cell_type": "markdown", + "id": "0474516d", + "metadata": {}, + "source": [ + "### restart fastapi" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "001d41fe", + "metadata": {}, + "outputs": [], + "source": [ + "!ssh kultmost 'systemctl restart fastapi.service'\n", + "!ssh kultmost 'systemctl status fastapi.service'" + ] + }, + { + "cell_type": "markdown", + "id": "004c5bea", + "metadata": {}, + "source": [ + "### restart celery" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3cc3fd1c", + "metadata": {}, + "outputs": [], + "source": [ + "!ssh kultmost 'systemctl restart vk-celery.service'\n", + "!ssh kultmost 'systemctl status vk-celery.service'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "68340709", + "metadata": {}, + "outputs": [], + "source": [ + "!ssh kultmost 'systemctl restart email-celery.service'\n", + "!ssh kultmost 'systemctl status email-celery.service'" ] }, { diff --git a/k8s/stunnel.yaml b/k8s/stunnel.yaml index 1686c20..c9889ee 100644 --- a/k8s/stunnel.yaml +++ b/k8s/stunnel.yaml @@ -62,9 +62,6 @@ spec: -o "StrictHostKeyChecking=no" \ -o "UserKnownHostsFile=/dev/null" \ -i /root/.ssh/id_rsa \ - -R 30080:kultmost-api.kultmost:80 \ - -L :6379:localhost:6379 \ - -L :27017:localhost:27017 \ -R 30300:10.1.77.0:30300 \ "${REMOTE_USER}@${REMOTE_HOST}" volumeMounts: