Skip to content

Commit f95e1a9

Browse files
committed
chore: updated deployment script to stop postgre if already running
1 parent 643b789 commit f95e1a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/init_db.sh

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ DB_PASSWORD="${POSTGRES_PASSWORD:=password}"
2222
DB_NAME="${POSTGRES_DB:=newsletter}"
2323
# Check if a custom port has been set, otherwise default to '5432'
2424
DB_PORT="${POSTGRES_PORT:=5432}"
25+
# stop postgres if it's already running
26+
sudo systemctl stop postgresql
2527
# Launch postgres using Docker
2628
docker run \
2729
-e POSTGRES_USER=${DB_USER} \

0 commit comments

Comments
 (0)