Add uv support, systemd service, and deployment tooling

- pyproject.toml: uv-native project definition (replaces requirements.txt for uv users)
- requirements.txt: kept for pip compatibility
- deploy/jigaido-bot.service: systemd service file (copy to /etc/systemd/system/)
- deploy/setup.sh: automated deployment script
- README.md: updated with uv instructions, tmux, and systemd setup
This commit is contained in:
shokollm
2026-04-01 09:15:41 +00:00
parent 7957947a04
commit 965c84379b
5 changed files with 180 additions and 9 deletions

View File

@@ -0,0 +1,30 @@
[Unit]
Description=JIGAIDO Telegram Bot
After=network.target
[Service]
Type=simple
# Run as the user who owns the repo. Change USER and GROUP as needed.
User=shoko
Group=shoko
# Path to this app directory
WorkingDirectory=/home/shoko/repositories/jigaido/apps/telegram-bot
# Load environment from .env in the WorkingDirectory
EnvironmentFile=/home/shoko/repositories/jigaido/apps/telegram-bot/.env
# Start jigaido using uv. Change the path to uv if needed (e.g. /home/user/.local/bin/uv).
# If uv is not in PATH, use the full path: ExecStart=/home/shoko/.local/bin/uv run python bot.py
ExecStart=/usr/local/bin/uv run python bot.py
# Restart on crash, wait 5s before restarting
Restart=always
RestartSec=5
# Logging
StandardOutput=append:/home/shoko/repositories/jigaido/apps/telegram-bot/bot.log
StandardError=append:/home/shoko/repositories/jigaido/apps/telegram-bot/bot.log
[Install]
WantedBy=multi-user.target