Skip to content

Commit 8d9c329

Browse files
committed
Do not try to create database 'template1'
1 parent 3884130 commit 8d9c329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ docker_process_sql() {
188188
# create initial database
189189
# uses environment variables for input: POSTGRES_DB
190190
docker_setup_db() {
191-
if [ "$POSTGRES_DB" != 'postgres' ]; then
191+
if [ "$POSTGRES_DB" != 'postgres' ] || [ "$POSTGRES_DB" != 'template1' ]; then
192192
POSTGRES_DB= docker_process_sql --dbname postgres --set db="$POSTGRES_DB" <<-'EOSQL'
193193
CREATE DATABASE :"db" ;
194194
EOSQL

0 commit comments

Comments
 (0)