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.
This commit is contained in:
Scott Idem
2026-03-10 17:40:26 -04:00
parent 055afda9c4
commit 16f98bc93d

View File

@@ -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"