How to deploy from Git
Guide for deploying from Git using Dockerfile Deploy
Overview
With Aptible, you have the option to deploy your code directly from Git using Dockerfile Deploy. This method involves pushing your source code, including a Dockerfile, to Aptible’s Git repository. Aptible will then create a Docker image for you, simplifying the deployment process. This guide will walk you through the steps of using Dockerfile Deploy to deploy your code from Git to Aptible.
Deploying via the Dashboard
The easiest way to deploy with Dockerfile Deploy within the Aptible Dashboard is by deploying a template or custom code using the Deploy tool.
Deploying via the CLI
⚠️ Prerequisites: Install the Aptible CLI
Step 1: Create an app
Use the aptible apps:create
to create an app. Note the provided Git Remote. As we advance in this article, we’ll refer to it as $GIT_URL
.
Step 2: Create a git repository on your local workstation
Example:
Step 3: Add your Dockerfile in the root of the repository
Example:
Step 4: Deploy to Aptible:
Deploying via Terraform
Dockerfile Deploy is not supported by Terraform. Use Direct Docker Image Deploy with Terraform instead.