File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,17 @@ DB_PORT="${POSTGRES_PORT:=5432}"
2323DB_HOST=" ${POSTGRES_HOST:= localhost} "
2424
2525# Launch Postgres using Docker
26- docker run \
27- -e POSTGRES_USER=${DB_USER} \
28- -e POSTGRES_PASSWORD=${DB_PASSWORD} \
29- -e POSTGRES_DB=${DB_NAME} \
30- -p " ${DB_PORT} " :5432 \
31- -d postgres \
32- postgres -N 1000
33- # ^ Increased maximum number of connections for testing purposes
26+ # Allow to skip Docker if a dockerized Postgres database is already running
27+ if [[ -z " ${SKIP_DOCKER} " ]]
28+ then
29+ docker run \
30+ -e POSTGRES_USER=${DB_USER} \
31+ -e POSTGRES_PASSWORD=${DB_PASSWORD} \
32+ -e POSTGRES_DB=${DB_NAME} \
33+ -p " ${DB_PORT} " :5432 \
34+ -d postgres \
35+ postgres -N 1000
36+ fi
3437
3538export PGPASSWORD=" ${DB_PASSWORD} "
3639until psql -h " ${DB_HOST} " -U " ${DB_USER} " -p " ${DB_PORT} " -d " postgres" -c ' \q' ; do
You can’t perform that action at this time.
0 commit comments