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 |
— |
data.image |
[“string”, “null”] |
Image override. |
data.command |
string |
— |
data.entrypoint |
string |
— |
data.stop_grace_period_seconds |
[“integer”, “null”] |
Seconds before forced stop. Null uses 5. |
data.port |
integer |
— |
data.publicly_exposed |
boolean |
— |
data.desired_size |
integer |
Replicas. |
data.enabled |
boolean |
— |
data.health_check |
object |
Readiness check. |
data.storage |
object |
— |
data.resources |
object |
Preset or custom resources. |
Example
{"data":{"clone_url":"https://github.com/acme/shop","services":[{"name":"web","command":"web","port":3000,"publicly_exposed":true}]}}