Use triggersEstimated reading time: 1 minute
Triggers are API endpoints that redeploy or scale a specific service
POST HTTP request is sent to them. You can create one or more
triggers per service.
Triggers do not require any authentication. This allows third party services like Docker Hub to call them, however because of this it is important that you keep their URLs secret.
The body of the
POST request is passed in to the new containers as an
environment variable called
Docker Cloud supports two types of triggers:
- Redeploy triggers, which redeploy the service when called
- Scale up triggers, which scale the service by one or more containers when called
Create a trigger
- Click the name of the service you want to create a trigger for.
Go to the detail page and scroll down to the Triggers section.
- In the Trigger name field, enter a name for the trigger.
- Select a trigger type.
Click the + (plus sign) icon.
- Use the POST request URL provided to configure the webhook in your application or third party service.
To stop a trigger from automatically scaling or redeploying, you must revoke it.
- Go to the detail page of the service.
- Scroll down to the Triggers section.
Click the trashcan icon for the trigger you want to revoke.
Once the trigger is revoked, it stops accepting requests.
Using triggers in the API and CLI
See our API and CLI documentation to learn how to use triggers with our API and the CLI.API, triggers, endpoints