ReferenceEnv var references
Service properties
A reference of the kind service gives the host, the port or a URL of a different service.
ferry env set web 'API_URL=${{service.api.internalUrl}}/v1'
# → API_URL=http://api:3000/v1 in the containers of webThe kind is service. You can also write svc. The name is the name of the service.
The properties
| Property | Other names | Value | Available for |
|---|---|---|---|
host | hostname | NAME: the hostname of the service on the private network | Each service type |
port | The port that the service listens on | Web services, private services, static sites | |
hostport | NAME:PORT | Web services, private services, static sites | |
internalUrl | http://NAME:PORT | Web services, private services, static sites | |
url | externalUrl | The public URL, such as http://web.localhost:8080 | Web services and static sites |
Which port
| The target service | Port |
|---|---|
| Has a live deploy | The port that the live deploy listens on |
| Has no live deploy yet | The port in its settings |
Has no deploy and no port setting | Not known |
If Ferry does not know the port, see Port references wait for the first deploy.