reworked to docker and selenoid

This commit is contained in:
2022-08-24 00:05:34 +03:00
parent 98b5bfe2a6
commit 6c8b27963b
5 changed files with 15 additions and 20 deletions

View File

@@ -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

View File

@@ -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"