Make the backend port configurable: first free port from 8001, stored in /etc/pyquest/env, shared by service and nginx

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
denis
2026-10-17 12:27:29 +02:00
parent ed2b0a5552
commit 1b702176ad
10 changed files with 103 additions and 14 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ WorkingDirectory=/opt/PyQuest/backend
EnvironmentFile=/etc/pyquest/env
ExecStartPre=/opt/PyQuest/.venv-prod/bin/python manage.py migrate --noinput
ExecStartPre=/opt/PyQuest/.venv-prod/bin/python manage.py collectstatic --noinput --verbosity 0
ExecStart=/opt/PyQuest/.venv-prod/bin/gunicorn pyquest_api.wsgi --bind 127.0.0.1:8001 --workers 3 --access-logfile - --error-logfile -
ExecStart=/opt/PyQuest/.venv-prod/bin/gunicorn pyquest_api.wsgi --bind 127.0.0.1:${PYQUEST_PORT} --workers 3 --access-logfile - --error-logfile -
Environment=PYTHONDONTWRITEBYTECODE=1
Restart=on-failure
RestartSec=3