diff --git a/setup_server.py b/setup_server.py index 57dac97..494e7bb 100644 --- a/setup_server.py +++ b/setup_server.py @@ -513,7 +513,8 @@ extendedKeyUsage = serverAuth log("── Creazione e avvio servizi ──") _write_services() 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}") log(f"{svc} avviato") @@ -593,6 +594,20 @@ server {{ proxy_set_header X-Forwarded-Proto https; 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/ {{ alias {FEEDS_DIR}/; autoindex off; @@ -676,6 +691,10 @@ def _write_services(): "sync": ("argos_sync_wsgi:app", 1, 4, 600, 8081, "Sync Daemon"), "ops": ("argos_ops_wsgi:app", 1, 4, 600, 8082, "Ops 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():