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 Jan 6, 2025
1 parent e8f34a7 commit 1b5336d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions infra/docker/database/pg13_16.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ RUN \

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"; \
sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" "$file"; \
done

# Install PostGIS extension
Expand Down
5 changes: 5 additions & 0 deletions infra/docker/database/upgrade_pg.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ 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"; \
done

# Install PostGIS extension in both versions of Postgres
RUN apt update
RUN \
Expand Down

0 comments on commit 1b5336d

Please sign in to comment.