diff --git a/.env.example b/.env.example index f9b81ff..c0279f5 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,11 @@ # forced to re-password in the browser at first sign-in. There is no secret to # put in this file for that -- set it in the app after the first `up -d`. +# Host port SimHub is reachable on, e.g. http://:8080. This maps to the +# container's fixed internal port 3000, so you can change it freely without +# touching the healthcheck. Defaults to 3000 if unset. +HOST_PORT=3000 + # Runtime environment. Leave as "production" for real deployments. NODE_ENV=production diff --git a/compose.yaml b/compose.yaml index 170a378..e8204d3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -29,9 +29,11 @@ services: init: true ports: - # "host:container" -- change the LEFT number to serve on a different host - # port. Quoted so YAML never reinterprets it (e.g. 22:22 as base-60). - - "3000:3000" + # "host:container". Set HOST_PORT in .env to serve on a different host + # port (defaults to 3000); the container port stays 3000 to match the + # image's healthcheck. Quoted so YAML never reinterprets it (e.g. 22:22 + # as base-60). + - "${HOST_PORT:-3000}:3000" environment: # Production defaults. Override in .env if needed.