Skip to content

Commit

Permalink
Add timescaledb to shared_preload_libraries in image
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAntoine committed May 23, 2024
1 parent 7e3dc11 commit 779779e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions infra/docker/database/pg13_16.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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) && \
Expand Down

0 comments on commit 779779e

Please sign in to comment.