-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip #14 postgres/run.sh remove container when stopped
name postgres container unambiguously run postgress container to backgroun document how to access postgress logs (since its running in the background by default
- Loading branch information
1 parent
104fc69
commit 5e9579a
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
#!/bin/bash | ||
|
||
docker stop postgres-salon-booking-guru > /dev/null | true | ||
docker run -it \ | ||
--name sbg-postgres \ | ||
--rm \ | ||
-d \ | ||
--name postgres-salon-booking-guru \ | ||
-e POSTGRES_PASSWORD="veryinsecure" \ | ||
-e POSTGRES_DB="postgres" \ | ||
-e PGDATA=/var/lib/postgresql/data/pgdata \ | ||
-v sbg-postgres:/var/lib/postgresql/data \ | ||
-v postgres:/var/lib/postgresql/data \ | ||
-p 5432:5432 \ | ||
postgres |