Skip to content

Instantly share code, notes, and snippets.

@parkan
Last active August 29, 2015 14:24
Show Gist options
  • Save parkan/0d75c363034db1ade31b to your computer and use it in GitHub Desktop.
Save parkan/0d75c363034db1ade31b to your computer and use it in GitHub Desktop.
Run a docker rails console container with heroku variables injected into ENV
# this replaces https://github.com/tpope/heroku-surrogate for docker containers (sort of)
docker-compose run `heroku config -a $APPNAME | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment