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.
Warning
If the App has Private Registry Credentials, Aptible will attempt to log in using these credentials. This should not be necessary unless the App uses a private base image in its Dockerfile. To prevent registry authentication, unset the credentials when deploying:
aptible deploy --app "$APP_HANDLE" \ --git-commitish "$BRANCH" \ --docker-image "" \ --private-registry-username "" \ --private-registry-password ""
Updated about 1 year ago