FerryDocs
ConceptsDeploys

The port of your app

Ferry chooses one container port at each deploy and gives it to your app in PORT.

Edit on GitHub

Port setting. The port setting of the service (--port).

1 / 5
Ferry uses the first value that it finds

What your app must do

Listen on the port in PORT, on the address 0.0.0.0.

server.js
const port = process.env.PORT;
app.listen(port, '0.0.0.0');

An app that listens on 127.0.0.1 in its container gets no traffic.

See the choice

The deploy log shows the port and where it comes from.

Deploy log
==> Using port 8000 (EXPOSEd by the image)

On this page