From b74409e325da1abdc61951896ef29446671f9e4d Mon Sep 17 00:00:00 2001 From: Pauliina Ilmanen Date: Wed, 4 Oct 2023 08:55:12 +0300 Subject: [PATCH] Update local Docker setup to match current requirements Upgrade PostgreSQL and add pg_trgm extension to the local Docker setup. --- docker/postgres/Dockerfile | 4 ++-- docker/postgres/docker-entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile index 43969cc8f..51af236bc 100644 --- a/docker/postgres/Dockerfile +++ b/docker/postgres/Dockerfile @@ -1,7 +1,7 @@ -FROM postgres:10 +FROM postgres:14 RUN apt-get update && apt-get install --no-install-recommends -y \ - postgis postgresql-10-postgis-2.5 postgresql-10-postgis-2.5-scripts + postgis postgresql-14-postgis-3 postgresql-14-postgis-3-scripts RUN localedef -i fi_FI -c -f UTF-8 -A /usr/share/locale/locale.alias fi_FI.UTF-8 diff --git a/docker/postgres/docker-entrypoint.sh b/docker/postgres/docker-entrypoint.sh index 26d09f195..291a74032 100755 --- a/docker/postgres/docker-entrypoint.sh +++ b/docker/postgres/docker-entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -for ext in postgis hstore; do +for ext in postgis hstore pg_trgm; do create_ext_sql="CREATE EXTENSION IF NOT EXISTS $ext" # Add the extensions to the default db template so that any # new db will have the extensions enabled includin test db.