Migrating from Dockerfile Deploy

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

First, if you have a Procfile or .aptible.yml file in your repository, you’ll need to embed it in your Docker image. To do so, follow the instructions at Procfiles and .aptible.yml with Direct Docker Image Deploy.

Second, if you modified your image to add the Procfile or .aptible.yml, then rebuild your image, and push it again.

Finally, 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 your app’s Git Repository is ignored going forward.

What if you don’t --git-detach?

If you don’t add the --git-detach flag, Enclave will fallback to a deprecated mode of operation called Companion Git Repository.

In this mode, the Procfile and .aptible.yml from your Git repository (if any) are used, and everything else (e.g. Dockerfile, source code) is ignored: your Docker image is deployed directly instead.

Using this mode of operation isn’t recommended (because it’s confusing). Instead, we encourage you to embed your Procfile and .aptible.yml in your Docker image, and add the –git-detach` flag to disable the Companion Git Repository.

Note

If you were to embed the files in your Docker Image without detaching, they’ll take precedence over the ones from your Companion Git Repository, even if you don’t add --git-detach flag.

This isn’t recommended either, so add the --git-detach flag!