Add a Service to an Environment, such as a worker. It starts with the Environment’s next deploy.
Arguments
| Argument |
Type |
Description |
data |
object |
The Service, as in service.yml from service:init. Required. |
data.environment_id |
string |
Environment id. |
data.name |
string |
Service name, such as web or worker. |
data.command |
string |
Command the Container runs. |
data.entrypoint |
string |
Optional entrypoint override. |
data.port |
integer |
Port the process listens on. |
data.publicly_exposed |
boolean |
Give the Service a public URL. |
data.desired_size |
integer |
Number of Containers. |
data.enabled |
boolean |
— |
data.health_check |
object |
Health check; runtime readiness gates routing. |
data.storage |
object |
Persistent storage. |
data.resources |
object |
Container size: a preset, or custom with cpu_vcpus and memory_gb. |
Example
{"data":{"clone_url":"https://github.com/acme/shop","services":[{"name":"web","command":"web","port":3000,"publicly_exposed":true}]}}