ConceptsEnvironment & env groups
References to a service
A reference to a service gives its name, its port or its URL.
host gives the name of the service. It is its hostname on the private network.
1 / 5
The kind is service. You can also write svc.
ferry env set api 'SEARCH_URL=${{service.search.internalUrl}}/v1'The properties
| Property | Aliases | Value |
|---|---|---|
host | hostname | The service name, its hostname on the private network |
port | The port the service listens on | |
hostport | host:port, for example api:3000 | |
internalUrl | http://host:port | |
url | externalUrl | The public URL (web services and static sites only) |
The port must be known
port, hostport and internalUrl need the port of the target service. Ferry knows it after that service deployed, or when you set its port with --port.
An example is a blueprint that deploys all the services at the same time. Then the deploy waits for the target. It waits 15 minutes at most, or two times the timeout of the health check if that is longer.
Two services reference the port of each other, and no one deployed yet. Then the deploy fails immediately. First deploy one of them without the reference.