From bf1e82c36d8df335bc2f5d386c59b99917f45c1c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sun, 24 Jan 2021 20:03:05 +0100 Subject: [PATCH 1/2] Update DB dockerfile to use the postgis image --- Dockerfile.db | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.db b/Dockerfile.db index 649f907669..27b3bedec4 100644 --- a/Dockerfile.db +++ b/Dockerfile.db @@ -1,3 +1,3 @@ -FROM mdillon/postgis:10 +FROM postgis/postgis:10-3.1-alpine -ADD ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d +COPY ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh From f701987e452589447f9b8710d89de9ee0cd59bee Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Tue, 26 Jan 2021 21:45:18 +0100 Subject: [PATCH 2/2] Downgrade to postgis 2.5, fix password --- Dockerfile.db | 2 +- docker-compose.yml | 1 + scripts/tune-postgis.sh | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.db b/Dockerfile.db index 27b3bedec4..489c073455 100644 --- a/Dockerfile.db +++ b/Dockerfile.db @@ -1,3 +1,3 @@ -FROM postgis/postgis:10-3.1-alpine +FROM postgis/postgis:10-2.5-alpine COPY ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh diff --git a/docker-compose.yml b/docker-compose.yml index 0ebe675817..60a2d09fea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: ports: - "127.0.0.1:5432:5432" environment: + - POSTGRES_HOST_AUTH_METHOD=trust - PG_WORK_MEM - PG_MAINTENANCE_WORK_MEM import: diff --git a/scripts/tune-postgis.sh b/scripts/tune-postgis.sh index e027052c2d..2c9745472c 100644 --- a/scripts/tune-postgis.sh +++ b/scripts/tune-postgis.sh @@ -3,5 +3,5 @@ set -e export PGUSER="$POSTGRES_USER" -"${psql[@]}" -c "ALTER SYSTEM SET work_mem='${PG_WORK_MEM:-16MB}';" -"${psql[@]}" -c "ALTER SYSTEM SET maintenance_work_mem='${PG_MAINTENANCE_WORK_MEM:-256MB}';" +psql -c "ALTER SYSTEM SET work_mem='${PG_WORK_MEM:-16MB}';" +psql -c "ALTER SYSTEM SET maintenance_work_mem='${PG_MAINTENANCE_WORK_MEM:-256MB}';"