Skip to content

Commit

Permalink
Add timescaledb to shared_preload_libraries in upgrade image
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAntoine committed May 23, 2024
1 parent da43512 commit f6cf582
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions infra/docker/database/upgrade_pg.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ RUN \
apt-get install -y timescaledb-$TIMESCALEDB_MAJOR-postgresql-$FROM_PG_MAJOR=$TIMESCALEDB_VERSION* timescaledb-$TIMESCALEDB_MAJOR-loader-postgresql-$FROM_PG_MAJOR=$TIMESCALEDB_VERSION* && \
apt-get install -y timescaledb-$TIMESCALEDB_MAJOR-postgresql-$TO_PG_MAJOR=$TIMESCALEDB_VERSION* timescaledb-$TIMESCALEDB_MAJOR-loader-postgresql-$TO_PG_MAJOR=$TIMESCALEDB_VERSION*

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 in both versions of Postgres
RUN apt update
RUN \
Expand Down

0 comments on commit f6cf582

Please sign in to comment.