From 7ebd50f9bd39480ef0a7921033ebed757dc2c89e11a16e6f7fa1b37c24491ed7 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Wed, 22 Jul 2026 22:03:32 -0400 Subject: [PATCH] hore --- build.ipynb | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/build.ipynb b/build.ipynb index 1c9d20d..d408177 100644 --- a/build.ipynb +++ b/build.ipynb @@ -549,6 +549,36 @@ "ssh kultmost 'systemctl daemon-reload && systemctl enable --now production.service && systemctl status --no-pager -l production.service'\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "d4552baa", + "metadata": { + "vscode": { + "languageId": "shellscript" + } + }, + "outputs": [], + "source": [ + "%%bash\n", + "ssh kultmost 'tee /etc/systemd/system/fastapi.service >/dev/null' <<'EOF'\n", + "[Unit]\n", + "Description=FastAPI prod service\n", + "After=network.target\n", + "\n", + "[Service]\n", + "WorkingDirectory=/app/production\n", + "ExecStart=/app/production/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 30080 --workers 8\n", + "Restart=always\n", + "EnvironmentFile=/app/production/env\n", + "\n", + "[Install]\n", + "WantedBy=default.target\n", + "EOF\n", + "\n", + "ssh kultmost 'systemctl daemon-reload && systemctl enable --now fastapi.service && systemctl status --no-pager -l fastapi.service'\n" + ] + }, { "cell_type": "markdown", "id": "dfd8deed", @@ -606,9 +636,24 @@ }, "outputs": [], "source": [ + "!ssh kultmost 'systemctl restart production.service'\n", "!ssh kultmost 'systemctl restart fastapi.service'" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "a87971ac", + "metadata": { + "vscode": { + "languageId": "shellscript" + } + }, + "outputs": [], + "source": [ + "!ssh kultmost 'systemctl status production.service'" + ] + }, { "cell_type": "code", "execution_count": null,