Created
November 4, 2014 01:52
-
-
Save mikeclarke/f044d4161d36ff864d37 to your computer and use it in GitHub Desktop.
.ebextension file for migrating a database with docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container_commands: | |
sync_db: | |
command: "docker run --env DATABASE_URL=`/opt/elasticbeanstalk/bin/get-config environment | jq -r .DATABASE_URL` aws_beanstalk/current-app:latest lein lobos migrate" | |
leader_only: true |
Thanks for the followup @bpicolo, you saved me a bunch of time.
In case this helps anyone else, heres my working version of the .ebextension file for migrating with docker using aws_beanstalk/staging-app:latest
: https://gist.github.com/jschr/873a4ad8591760202c20ea702e6d3c99.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm late here, but this was incredibly helpful, thanks!
@xuebingli for you and moreso people who stumble on this in the future,
aws_beanstalk/staging-app:latest
would be the incoming app.I figured this out by adding a 'docker images' command to container_commands, and then pulling the beanstalk logs.