deploy: подготовить артефакты для деплоя на baton.itafrika.com
- nginx/baton.conf: заменить <YOUR_DOMAIN> на baton.itafrika.com - deploy/baton.service: добавить systemd-юнит для uvicorn (/opt/baton, port 8000) - deploy/baton-keepalive.service: прописать реальный URL health-эндпоинта - deploy/env.template: шаблон .env для сервера (без секретов) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2ee953866b
commit
b70d5990c8
4 changed files with 42 additions and 5 deletions
18
deploy/baton.service
Normal file
18
deploy/baton.service
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Baton — Telegram bot FastAPI backend
|
||||
After=network.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=www-data
|
||||
WorkingDirectory=/opt/baton
|
||||
EnvironmentFile=/opt/baton/.env
|
||||
ExecStart=/opt/baton/venv/bin/uvicorn backend.main:app --host 127.0.0.1 --port 8000
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue