~vpzom/lotide

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[RFC PATCH lotide 0/1] developers helper script for starting postgres container

Details
Message ID
<20201223221454.3076-1-mail@beyermatthias.de>
DKIM signature
missing
Download raw message
Hi,

this is a RFC patch, because I don't know whether such a thing is welcome. This
adds a script that boots up a docker container with postgres and prepares the
database so that one can start development even faster.

Feel free to apply or suggest changes!

Matthias

Matthias Beyer (1):
  Add script to boot up prepared postgres docker container

 scripts/boot-pg-dev.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 scripts/boot-pg-dev.sh

-- 
2.29.2

[RFC PATCH lotide 1/1] Add script to boot up prepared postgres docker container

Details
Message ID
<20201223221454.3076-2-mail@beyermatthias.de>
In-Reply-To
<20201223221454.3076-1-mail@beyermatthias.de> (view parent)
DKIM signature
missing
Download raw message
Patch: +20 -0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
---
 scripts/boot-pg-dev.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 scripts/boot-pg-dev.sh

diff --git a/scripts/boot-pg-dev.sh b/scripts/boot-pg-dev.sh
new file mode 100644
index 0000000..031dcea
--- /dev/null
+++ b/scripts/boot-pg-dev.sh
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

CONTAINER_NAME=lotide-pg-dev
DB_PW=password
DB_USER=dbuser
DB_NAME=lotidedev

docker run \
    --name "${CONTAINER_NAME}" \
    -e POSTGRES_PASSWORD=${DB_PW} \
    -p 5432:5432 \
    -m 512m \
    -d \
    --rm \
    postgres

sleep 2
docker exec -it "${CONTAINER_NAME}" psql -U postgres -c "CREATE USER ${DB_USER} PASSWORD '${DB_PW}' SUPERUSER CREATEDB INHERIT LOGIN"
docker exec -it "${CONTAINER_NAME}" psql -U postgres -c "CREATE DATABASE ${DB_NAME}"

-- 
2.29.2
Reply to thread Export thread (mbox)