+ systemd service for TG bot
* Cleanup in .env
This commit is contained in:
parent
cfb75bad34
commit
1ea70513b0
|
|
@ -1,11 +1,12 @@
|
|||
APP_HOME=/var/www/poizonstore-stage
|
||||
APP_HOME="/var/www/poizonstore-stage"
|
||||
|
||||
# === Keys ===
|
||||
# Django
|
||||
SECRET_KEY=""
|
||||
ALLOWED_HOSTS=.crm-poizonstore.ru,127.0.0.1,localhost,45.84.227.72
|
||||
ALLOWED_HOSTS=".crm-poizonstore.ru,127.0.0.1,localhost,45.84.227.72"
|
||||
|
||||
# Telegram bot
|
||||
TG_BOT_BIN="/var/www/poizonstore-stage/env/bin/python run_tg_bot.py"
|
||||
TG_BOT_TOKEN=""
|
||||
|
||||
# External API settings
|
||||
|
|
|
|||
15
_deploy/tg_bot.service
Normal file
15
_deploy/tg_bot.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=PoizonStore Telegram bot service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=poizon
|
||||
Group=poizon
|
||||
EnvironmentFile=/var/www/poizonstore-stage/.env
|
||||
WorkingDirectory=/var/www/poizonstore-stage
|
||||
ExecStart=/bin/sh -c '${TG_BOT_BIN}'
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue
Block a user