Skip to content

Instantly share code, notes, and snippets.

@mikeclarke
Created November 4, 2014 01:52
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikeclarke/f044d4161d36ff864d37 to your computer and use it in GitHub Desktop.
Save mikeclarke/f044d4161d36ff864d37 to your computer and use it in GitHub Desktop.
.ebextension file for migrating a database with docker
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
@jschr
Copy link

jschr commented Jan 2, 2017

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