From 779779ef569a30caddf6ff7d66caaf0d6902e289 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 23 May 2024 10:53:07 +0200 Subject: [PATCH] Add timescaledb to shared_preload_libraries in image --- infra/docker/database/pg13_16.Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/infra/docker/database/pg13_16.Dockerfile b/infra/docker/database/pg13_16.Dockerfile index cedebdb38c..57d5b278e4 100644 --- a/infra/docker/database/pg13_16.Dockerfile +++ b/infra/docker/database/pg13_16.Dockerfile @@ -26,6 +26,13 @@ RUN \ timescaledb-$TIMESCALEDB_MAJOR-loader-postgresql-$PG_MAJOR=$TIMESCALEDB_VERSION* && \ rm -rf /var/lib/apt/lists/* +RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do \ + # We want timescaledb to be loaded in this image by every created cluster + sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" $file \ + # We need to listen on all interfaces, otherwise PostgreSQL is not accessible + && echo "listen_addresses = '*'" >> $file; \ + done + # Install PostGIS extension RUN \ POSTGIS_MAJOR=$(echo $POSTGIS_VERSION | cut -c1) && \