ConceptsEnvironment & env groups
Injected variables
Ferry adds PORT and the FERRY_* variables to each container of a service.
Ferry adds its variables to each container of a service.
1 / 3
An injected variable comes from Ferry, not from you. Ferry adds these variables to each container of a service. If you set a variable with the same name, your value wins.
The variables
| Variable | Value | Set for |
|---|---|---|
PORT | The port Ferry routes to | Web services, private services, static sites |
FERRY | true | All |
FERRY_SERVICE_ID | For example srv-5c57d756f6ad47f59800 | All |
FERRY_SERVICE_NAME | For example echo | All |
FERRY_SERVICE_TYPE | web_service, private_service, background_worker, cron_job or static_site | All |
FERRY_DEPLOY_ID | The deploy the container belongs to | All |
FERRY_INTERNAL_HOSTNAME | The service name (its private hostname) | All |
FERRY_GIT_COMMIT, FERRY_GIT_BRANCH | The deployed commit and the branch | Deploys from git |
FERRY_EXTERNAL_HOSTNAME | For example echo.localhost | Web services, static sites |
FERRY_EXTERNAL_URL | For example http://echo.localhost:8080 | Web services, static sites |
See The PORT variable and Builds & runtimes.