Update setup_server.py
This commit is contained in:
parent
743a4b6057
commit
9779d77413
|
|
@ -513,7 +513,8 @@ extendedKeyUsage = serverAuth
|
||||||
log("── Creazione e avvio servizi ──")
|
log("── Creazione e avvio servizi ──")
|
||||||
_write_services()
|
_write_services()
|
||||||
run("systemctl daemon-reload")
|
run("systemctl daemon-reload")
|
||||||
for svc in ["argos-backend", "argos-sync", "argos-ops", "argos-analytics"]:
|
for svc in ["argos-backend", "argos-sync", "argos-ops", "argos-analytics",
|
||||||
|
"argos-updater"]:
|
||||||
run(f"systemctl enable --now {svc}")
|
run(f"systemctl enable --now {svc}")
|
||||||
log(f"{svc} avviato")
|
log(f"{svc} avviato")
|
||||||
|
|
||||||
|
|
@ -593,6 +594,20 @@ server {{
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
proxy_read_timeout 120s;
|
proxy_read_timeout 120s;
|
||||||
}}
|
}}
|
||||||
|
location /api/updater/ {{
|
||||||
|
# argos-updater (porta 8084) - servizio dedicato orchestrazione update.
|
||||||
|
# NON viene riavviato da update.sh, permette polling status durante
|
||||||
|
# il restart dei 4 servizi principali (introdotto v1.16.0).
|
||||||
|
proxy_pass http://127.0.0.1:8084/api/updater/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
proxy_connect_timeout 5s;
|
||||||
|
proxy_send_timeout 10s;
|
||||||
|
proxy_read_timeout 10s;
|
||||||
|
proxy_next_upstream off;
|
||||||
|
}}
|
||||||
location /feeds/ {{
|
location /feeds/ {{
|
||||||
alias {FEEDS_DIR}/;
|
alias {FEEDS_DIR}/;
|
||||||
autoindex off;
|
autoindex off;
|
||||||
|
|
@ -676,6 +691,10 @@ def _write_services():
|
||||||
"sync": ("argos_sync_wsgi:app", 1, 4, 600, 8081, "Sync Daemon"),
|
"sync": ("argos_sync_wsgi:app", 1, 4, 600, 8081, "Sync Daemon"),
|
||||||
"ops": ("argos_ops_wsgi:app", 1, 4, 600, 8082, "Ops Daemon"),
|
"ops": ("argos_ops_wsgi:app", 1, 4, 600, 8082, "Ops Daemon"),
|
||||||
"analytics": ("argos_analytics_wsgi:app", 1, 4, 300, 8083, "Analytics Daemon"),
|
"analytics": ("argos_analytics_wsgi:app", 1, 4, 300, 8083, "Analytics Daemon"),
|
||||||
|
# argos-updater (v1.16.0): servizio dedicato per orchestrazione update.sh.
|
||||||
|
# NON viene riavviato da update.sh stesso, quindi la UI puo' fare polling
|
||||||
|
# status anche durante il restart degli altri 4 servizi.
|
||||||
|
"updater": ("argos_updater_wsgi:app", 1, 2, 60, 8084, "Updater Service"),
|
||||||
}
|
}
|
||||||
|
|
||||||
for svc, (wsgi, workers, threads, timeout, port, desc) in services.items():
|
for svc, (wsgi, workers, threads, timeout, port, desc) in services.items():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue