mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-12-15 03:06:45 +03:00
reworked to docker and selenoid
This commit is contained in:
@@ -5,7 +5,7 @@ After=network-online.target
|
||||
[Service]
|
||||
Restart=always
|
||||
WorkingDirectory=/opt/mosgortrans
|
||||
ExecStart=/bin/bash /opt/mosgortrans/scripts/start-bot.sh
|
||||
ExecStop=/bin/bash /opt/mosgortrans/scripts/stop-bot.sh
|
||||
ExecStart=/usr/local/bin/docker-compose -f /opt/mosgortrans/docker-compose.yml up
|
||||
ExecStop=/usr/local/bin/docker-compose -f /opt/mosgortrans/docker-compose.yml down -v
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,17 +1,15 @@
|
||||
#! /bin/bash
|
||||
|
||||
|
||||
echo "starting the bot"
|
||||
cd /opt/mosgortrans \
|
||||
&& source /home/balsh/.cache/pypoetry/virtualenvs/mosgortrans-3eZxMcY3-py3.10/bin/activate \
|
||||
&& gunicorn app.main:create_app \
|
||||
--bind prod-server.lan:8084 \
|
||||
|
||||
gunicorn main:create_app \
|
||||
--bind 127.0.0.1:8084 \
|
||||
--worker-class aiohttp.GunicornWebWorker \
|
||||
--timeout 150 \
|
||||
--max-requests 2000 \
|
||||
--max-requests-jitter 400 \
|
||||
--chdir "/opt/mosgortrans/logs" \
|
||||
--chdir "/app/logs" \
|
||||
--log-level info \
|
||||
--error-logfile "/opt/mosgortrans/logs/gunicorn_err.log" \
|
||||
--error-logfile "/app/logs/gunicorn_err.log" \
|
||||
--worker-tmp-dir "/tmp" \
|
||||
--pid "/opt/mosgortrans/logs/gunicorn_pid"
|
||||
--pid "/app/logs/gunicorn_pid"
|
||||
Reference in New Issue
Block a user