Automating Docker Deployments

Automating the Deployment Process

Flightcontrol provides a build system for projects using either Nixpacks or Dockerfiles to create the build. However, if you have a continuous integration system that builds your Docker images, you can use Flightcontrol to provision your AWS infrastruture and continously deploy those images into your AWS account.

Flightcontrol supports Deploy Hooks (opens in a new tab), which are webhooks your applications can use to trigger a deployment with Flightcontrol.

Creating a Deploy Hook

Let's create a deploy hook for our project.

From the Environment settings sidebar, choose the Deploy hooks tab.

Deploy hooks section of Environment Settings

Click the Add new button to display the Create a Deploy Hook dialog.

Fill in a name for your hook, and then click on the Create Deploy Hook button.

Create Deploy Hook

After naming and creating the deploy hook, you'll see the URL for the deploy hook. You can use this URL to trigger a deployment with Flightcontrol.

After Deploy Hook was created, showing deployment URL

Treat the deploy hook URL like a password - anyone with the URL can trigger a deployment with Flightcontrol. If you need to revoke access to the deploy hook URL, you can delete the deploy hook and create a new one.

Triggering a Deployment

You can trigger a deployment with Flightcontrol by sending an HTTP GET request to the deploy hook URL. You can load the URL in your web browser if you want to test it out.

After triggering a deployment, you'll see the deployment in the Deployments section of the envrionment dashboard.

Deployments tab after triggering a deployment

After making a GET request to the deploy hook URL, you'll get a JSON response with the deployment ID from Flightcontrol.

  "success": true,
  "deploymentId": "clijekhhm0j9krxxxxxxxxxzz"

You can use the deployment ID to check the status of the deployment with the Get Deployment API. You will need an API Key to use the Get Deployment API.