Created
September 11, 2019 02:35
-
-
Save brunodrugowick/f669e89df54f244bcfa1c3bc2a513b7f to your computer and use it in GitHub Desktop.
Script for postgres docker for development
This file contains 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 | |
start() { | |
sudo docker run --rm --name postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v /home/drugo/docker/volumes/postgres:/var/lib/postgresql/data postgres | |
return 0 | |
} | |
stop() { | |
sudo docker stop postgres | |
return 0 | |
} | |
case $1 in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
start | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment