GuidesLanguage guides
Three rules for every language
The port, the start command and the build command obey the same rules in every language.
The build command runs after the install of the dependencies.
1 / 3
Listen on 0.0.0.0 and on PORT
Ferry sets PORT to the port that it routes to. The value is 10000, unless one of these is true:
- You set
--port. - You set a
PORTvariable. - Your image exposes one port only.
See The port of your app.
The start command
Ferry uses the first start command that exists:
- The start command of the service (
--start-cmd). - The entry of the Procfile for the type of the service.
- The default of the language.
| Type of service | Procfile entry |
|---|---|
| Web service, private service | web: |
| Background worker | worker: |
| Cron job | cron:, then worker: |
The build command
A build command (--build-cmd) runs after the install of the dependencies. It can read your environment variables.