Stop publishing a host port
`docker compose up` failed with "port is already allocated": 3000 was taken by an unrelated project on the same machine. Publishing it was never needed — in production the only thing that has to reach this service is the reverse proxy, which does so over the compose network as `landing:3000`. `expose` replaces `ports`, and a commented `ports` block stays for the cases that do want a host binding. LANDING_PORT is kept but re-labelled as only mattering then. Verified: the container binds nothing on the host, answers 200 with the full page from another container on the network, and stays healthy — its health check was always internal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
# the browser never talks to the API directly.
|
||||
PIREON_API_URL=https://landing-api.pireon.dev/api
|
||||
|
||||
# Host port the container is published on. Change it if something else already
|
||||
# holds 3000 on the machine — the container always listens on 3000 internally.
|
||||
# Only used if you uncomment `ports` in docker-compose.yml. By default the
|
||||
# container is not published on the host at all: the reverse proxy reaches it
|
||||
# over the compose network as `landing:3000`, and publishing a host port only
|
||||
# invites a collision with whatever else is on that number.
|
||||
LANDING_PORT=3000
|
||||
|
||||
# Needed only to *build* the image: `@pi/ui` comes from the private Nexus.
|
||||
|
||||
Reference in New Issue
Block a user