Add 'docker-run-postgres.sh'
This commit is contained in:
parent
6fa63d5be2
commit
13e8bc426c
1 changed files with 14 additions and 0 deletions
14
docker-run-postgres.sh
Normal file
14
docker-run-postgres.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PG_DB=${1}
|
||||||
|
PG_USER=${2}
|
||||||
|
PG_PASS=${3}
|
||||||
|
MNT_DIR=${4}
|
||||||
|
|
||||||
|
docker run -d \
|
||||||
|
-e POSTGRES_DB=${PG_DB} \
|
||||||
|
-e POSTGRES_USER=${PG_USER} \
|
||||||
|
-e POSTGRES_PASSWORD=${PG_PASS} \
|
||||||
|
-v ${MNT_DIR}:/var/lib/postgresql/data \
|
||||||
|
-p 5432:5432 \
|
||||||
|
postgres:15
|
||||||
Loading…
Add table
Add a link
Reference in a new issue