- 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
31 lines
921 B
Desktop File
31 lines
921 B
Desktop File
[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
|