feat(manager): add remote VM support via NEXUS_SERVER_HOST
- config.py: add NEXUS_SERVER_HOST env var for cross-VM deployment - health_service.py: graceful Redis failure when only localhost-bound - systemd service: document remote VM configuration - README: add dedicated 'VM separada' installation section - .env.example: new file with remote connection examples
This commit is contained in:
@@ -34,11 +34,15 @@ DEMO_DEFAULT_DAYS = int(os.environ.get("DEMO_DEFAULT_DAYS", "14"))
|
||||
DEMO_DEFAULT_PIN = os.environ.get("DEMO_DEFAULT_PIN", "0000")
|
||||
DEMO_SUBDOMAIN_PREFIX = os.environ.get("DEMO_SUBDOMAIN_PREFIX", "demo")
|
||||
|
||||
# ─── Remote Nexus Server (for VM-separated manager) ────────────────────────
|
||||
# Set this to the IP/hostname of the server running POS/PostgreSQL/Redis
|
||||
NEXUS_SERVER_HOST = os.environ.get("NEXUS_SERVER_HOST", "127.0.0.1")
|
||||
|
||||
# ─── Services Health Check ─────────────────────────────────────────────────
|
||||
POS_URL = os.environ.get("POS_URL", "http://127.0.0.1:5001/pos/health")
|
||||
DASHBOARD_URL = os.environ.get("DASHBOARD_URL", "http://127.0.0.1:5000/")
|
||||
QUART_URL = os.environ.get("QUART_URL", "http://127.0.0.1:5002/")
|
||||
REDIS_URL = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
|
||||
POS_URL = os.environ.get("POS_URL", f"http://{NEXUS_SERVER_HOST}:5001/pos/health")
|
||||
DASHBOARD_URL = os.environ.get("DASHBOARD_URL", f"http://{NEXUS_SERVER_HOST}:5000/")
|
||||
QUART_URL = os.environ.get("QUART_URL", f"http://{NEXUS_SERVER_HOST}:5002/")
|
||||
REDIS_URL = os.environ.get("REDIS_URL", f"redis://{NEXUS_SERVER_HOST}:6379/0")
|
||||
|
||||
# ─── Paths ─────────────────────────────────────────────────────────────────
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
Reference in New Issue
Block a user