Created
February 2, 2019 17:53
-
-
Save mindscratch/df47f092aa91c4965d57934b219c8b36 to your computer and use it in GitHub Desktop.
Run postgres in docker for dev
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
#!/bin/bash | |
DB_USER=user | |
DB_PASSWORD=password | |
DB=demo | |
DATA_DIR="$(pwd)/postgres-data" | |
mkdir -p $DATA_DIR | |
docker run -d -p 5432:5432 \ | |
-e POSTGRES_USER=$DB_USER \ | |
-e POSTGRES_PASSWORD=$DB_PASSWORD \ | |
-e POSTGRES_DB=$DB \ | |
-v $DATA_DIR:/var/lib/postgresql/data postgres:9.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment