mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-28 10:26:12 +01:00
First version
This commit is contained in:
11
start-local-db.sh
Executable file
11
start-local-db.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
result=$(docker ps | grep postgres)
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "postgres is already running, doing nothing"
|
||||
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 ./postgres-data:/var/lib/postgresql/data postgres
|
||||
sleep 5 # Wait for postgres to start
|
||||
fi
|
||||
Reference in New Issue
Block a user