Migrating from Direct Docker Image Deploy to Dockerfile Deploy

If your app is configured to use Direct Docker Image Deploy (i.e. you deployed using aptible deploy in the past), you can switch to Dockerfile Deploy instead, but you’ll need to do so explicitly.

To do so, start by pushing your git repository to a temporary branch. This will not trigger a deploy, but we’ll use it in just a moment:

BRANCH="deploy-$(date "+%s")"
git push aptible "master:$BRANCH"

Then, deploy this branch (using the --git-commitish argument), and disable Direct Docker Image Deploy (using an empty string for the --docker-image argument will achieve that):

aptible deploy --app "$APP_HANDLE" \
        --git-commitish "$BRANCH" \
        --docker-image ""

Going forward, you can simply use git push aptible master to deploy.