update
This commit is contained in:
+21
-10
@@ -51,12 +51,17 @@ They will NOT work over standard HTTP.
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
4. RUNNING AS A SERVICE (SYSTEMD)
|
4. RUNNING AS A SERVICE (SYSTEMD)
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
NOTE: Make sure your fleet-console.service file points to
|
⚠️ IMPORTANT (VENV USERS): Before copying the service file,
|
||||||
the executable inside the venv (e.g., ExecStart=/opt/web-control-server/venv/bin/gunicorn ...)
|
open 'fleet-control.service' and ensure the paths point to your
|
||||||
|
virtual environment.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
WorkingDirectory=/opt/web-control-server
|
||||||
|
ExecStart=/opt/web-control-server/venv/bin/gunicorn -k ...
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
1. Copy .service file to '/etc/systemd/system/':
|
1. Copy .service file to '/etc/systemd/system/':
|
||||||
sudo cp fleet-console.service /etc/systemd/system/
|
sudo cp fleet-control.service /etc/systemd/system/
|
||||||
2. Reload systemd: sudo systemctl daemon-reload
|
2. Reload systemd: sudo systemctl daemon-reload
|
||||||
3. Enable on boot: sudo systemctl enable fleet-console
|
3. Enable on boot: sudo systemctl enable fleet-console
|
||||||
4. Start service: sudo systemctl start fleet-console
|
4. Start service: sudo systemctl start fleet-console
|
||||||
@@ -106,12 +111,18 @@ Passaggi:
|
|||||||
3. Imposta 'vapid_claim_email' (es. "mailto:tua@email.com").
|
3. Imposta 'vapid_claim_email' (es. "mailto:tua@email.com").
|
||||||
|
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
4. ESECUZIONE COME SERVIZIO
|
4. ESECUZIONE COME SERVIZIO (SYSTEMD)
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
NOTA BENE: Assicurati che il file fleet-console.service
|
⚠️ IMPORTANTE (PER UTENTI VENV): Prima di copiare il file di
|
||||||
punti all'eseguibile dentro il venv (es: ExecStart=/opt/web-control-server/venv/bin/gunicorn ...)
|
servizio, apri 'fleet-control.service' e assicurati che i percorsi
|
||||||
|
puntino al tuo ambiente virtuale!
|
||||||
|
|
||||||
1. sudo cp fleet-console.service /etc/systemd/system/
|
Esempio:
|
||||||
2. sudo systemctl daemon-reload
|
WorkingDirectory=/opt/web-control-server
|
||||||
3. sudo systemctl enable fleet-console
|
ExecStart=/opt/web-control-server/venv/bin/gunicorn -k ...
|
||||||
4. sudo systemctl start fleet-console
|
|
||||||
|
Passaggi:
|
||||||
|
1. Copia il file in systemd: sudo cp fleet-control.service /etc/systemd/system/
|
||||||
|
2. Ricarica la configurazione: sudo systemctl daemon-reload
|
||||||
|
3. Abilita all'avvio: sudo systemctl enable fleet-console
|
||||||
|
4. Avvia il servizio: sudo systemctl start fleet-console
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/web-control
|
# Assicurati che questo sia il percorso esatto della cartella del tuo progetto
|
||||||
ExecStart=/usr/local/bin/gunicorn -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -w 1 --graceful-timeout 2 --bind 0.0.0.0:9000 app:app
|
WorkingDirectory=/opt/web-control-server
|
||||||
|
# PUNTA AL GUNICORN DENTRO IL VENV!
|
||||||
|
ExecStart=/opt/web-control-server/venv/bin/gunicorn -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -w 1 --graceful-timeout 2 --bind 0.0.0.0:9000 app:app
|
||||||
TimeoutStopSec=3
|
TimeoutStopSec=3
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|||||||
Reference in New Issue
Block a user