From 16f98bc93dd3e49ebb575e4295051bbbd0ebcda5 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 10 Mar 2026 17:40:26 -0400 Subject: [PATCH] fix: use port range for ae_app to support scaling with host port binding Replace single AE_APP_NODE_PORT with AE_APP_NODE_PORT_RANGE (e.g. 3001-3006). Docker assigns one port from the range to each replica, enabling external nginx upstreams to reference individual ports per instance. ae_api needs no host ports -- it scales via Docker DNS through ae_web_dev. --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 72eef2f..7910cd0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -146,7 +146,11 @@ services: env_file: - ./.env ports: - - "${AE_APP_NODE_PORT}:3000" + # Port range allows scaling: Docker assigns one host port per replica. + # e.g. AE_APP_NODE_PORT_RANGE=3001-3006 with AE_APP_REPLICAS=3 binds + # 3001→replica-1, 3002→replica-2, 3003→replica-3. + # Add matching ports to the external nginx upstream to enable them. + - "${AE_APP_NODE_PORT_RANGE:-3001-3001}:3000" extra_hosts: srv-nyx.oneskyit.com: "104.237.143.4" dev-app.oneskyit.com: "104.237.143.4"