Aptible PaaS logoDocs

How to migrate from Dockerfile Deploy to Direct Docker Image Deploy

If you are currently using Dockerfile Deploy and would like to migrate to a Direct Docker Image Deploy, use the following instructions:

  1. If you have a Procfile or .aptible.yml file in your repository, you must embed it in your Docker image. To do so, follow the instructions at Procfiles and .aptible.yml with Direct Docker Image Deploy.
  2. If you modified your image to add the Procfile or .aptible.yml, rebuild your image and push it again.
  3. Deploy using aptible deploy as documented in Using aptible deploy, with one exception: the first time you deploy (you don't need to do it again), add the --git-detach flag to this command. Adding the --git-detach flag ensures Aptible ignores your app's Companion Git Repository in the future.

What if you don't add --git-detach?

If you don't add the --git-detach flag, Aptible will fall back to a deprecated mode of operation called Companion Git Repository.

In this mode, Aptible uses the Procfile and .aptible.yml from your Git repository, if any, and ignores everything else (e.g., Dockerfile, source code). Aptible deploys your Docker Image directly instead. Because of this behavior, using this mode of operation isn't recommended. Instead, embed your Procfile and .aptible.yml in your Docker Image, and add the --git-detach flag to disable the Companion Git Repository.

How to migrate from Dockerfile Deploy to Direct Docker Image Deploy