Overview
Aptible lets you deploying via Docker image. Additionally, Aptible’s Terraform Provider currently only supports this deployment method. This guide will cover the process for deploying via Docker image to Aptible via the CLI, Terraform, or CI/CD.Deploying via the CLI
⚠️ Prerequisites: Install the Aptible CLI
01: Create an app
Use theaptible apps:create
to create an app. Note the handle you give to the app. We’ll refer to it as $APP_HANDLE
.
02: Deploy a Docker image to your app
Use theaptible deploy
command to deploy a public Docker image to your app like so:
📘 If you are migrating from Dockerfile Deploy, you should also add the —git-detach flag to this command the first time you deploy. See Migrating from Dockerfile Deploy for more information.
Deploying via Terraform
⚠️ Prerequisites: Install the Aptible CLI and the Terraform CLI
01: Create an app
Apps can be created using the terraformaptible_app
resource.
Step 2: Deploy a Docker Image
Set your Docker repo with the registry username and registry password as the configuration variables:APTIBLE_DOCKER_IMAGE
, APTIBLE_PRIVATE_REGISTRY_USERNAME
, and APTIBLE_PRIVATE_REGISTRY_PASSWORD
.
📘 Please ensure you have the correct image, username, and password set every time you run. terraform apply
See Terraform’s refresh Terraform configuration documentation for more infromation