Деплой: python-dotenv для загрузки .env, порт 18091 в DEPLOY.md

This commit is contained in:
apuc committed 2026-09-16 13:14:18 +03:00
1 parent 7738d35f3d
commit 4dcaffd4c4
5 files changed
+20 -6

No files matched your search

+4 -4
View File
@@ -9,7 +9,7 @@
│ nginx │ Let's Encrypt
│ reverse proxy│
└───────┬───────┘
│ :5000
│ :18091
▼
gunicorn (Flask: авторизация, изоляция данных, лимиты генераций)
│
@@ -201,7 +201,7 @@ WorkingDirectory=/opt/hh_auto
Environment=DISPLAY=:99
EnvironmentFile=/opt/hh_auto/.env
ExecStart=/opt/hh_auto/.venv/bin/gunicorn \
-w 1 --threads 8 --timeout 300 -b 127.0.0.1:5000 webui:app
-w 1 --threads 8 --timeout 300 -b 127.0.0.1:18091 webui:app
Restart=always
RestartSec=5
LimitNOFILE=65536
@@ -245,7 +245,7 @@ server {
client_max_body_size 20M;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_pass http://127.0.0.1:18091;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -296,7 +296,7 @@ chmod 644 /etc/cron.d/hh-backup
journalctl -u hh-web -f
# Здоровье
curl -sf http://127.0.0.1:5000/api/accounts > /dev/null || systemctl restart hh-web
curl -sf http://127.0.0.1:18091/api/accounts > /dev/null || systemctl restart hh-web
```
---