Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Last active August 29, 2015 14:17
Show Gist options
  • Save dpritchett/9b877f2b53fea3402d28 to your computer and use it in GitHub Desktop.
Save dpritchett/9b877f2b53fea3402d28 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# take the current folder name as the app name
APPNAME=${PWD##*/}
# start a new persistent postgres container named appname_pg that listens on local port 5432
docker run -p 5432:5432 --name ${APPNAME}_pg postgres
#!/usr/bin/env sh
# take current folder name (e.g. arai) as the app name
APPNAME=${PWD##*/}
docker start -a ${APPNAME}_pg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment