From 9b8f716a6a7d8817fd059ccf23504da3ae640b4c Mon Sep 17 00:00:00 2001 From: Tuomas Jaakola Date: Fri, 2 Aug 2024 17:58:33 +0300 Subject: [PATCH] Use unique name for postgres container (#171) --- scripts/start-local-db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-local-db.sh b/scripts/start-local-db.sh index 19d10c6..b05fded 100755 --- a/scripts/start-local-db.sh +++ b/scripts/start-local-db.sh @@ -1,4 +1,4 @@ -result=$(docker ps | grep postgres) +result=$(docker ps | grep spliit-db) if [ $? -eq 0 ]; then echo "postgres is already running, doing nothing" @@ -6,6 +6,6 @@ else echo "postgres is not running, starting it" docker rm postgres --force mkdir -p postgres-data - docker run --name postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=1234 -v "/$(pwd)/postgres-data:/var/lib/postgresql/data" postgres + docker run --name spliit-db -d -p 5432:5432 -e POSTGRES_PASSWORD=1234 -v "/$(pwd)/postgres-data:/var/lib/postgresql/data" postgres sleep 5 # Wait for postgres to start fi