Skip to content

Commit

Permalink
wip #14 postgres/run.sh remove container when stopped
Browse files Browse the repository at this point in the history
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
chrisjsimpson committed Jul 18, 2021
1 parent 104fc69 commit 5e9579a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/QUICK_START_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ instance using docker:
```bash
postgres/run.sh
```
### Database logs
```
docker logs -f postgres
```

**Note:** This database configuration should only ever be used for the purpose
of local development, since all credentials are stored in this public
Expand Down
7 changes: 5 additions & 2 deletions postgres/run.sh
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

0 comments on commit 5e9579a

Please sign in to comment.