Skip to content

Commit 151b195

Browse files
WarpSQL: add PostGIS support to Bitnami Dockerfile and entrypoint
1. Update Dockerfile to install PostGIS dependencies and PostGIS extension 2. Modify timescaledb-bitnami-entrypoint.sh to include PostGIS in the shared preload libraries list
1 parent 112a585 commit 151b195

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

bitnami/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ RUN set -ex \
8080
make \
8181
cmake \
8282
wget \
83+
postgis \
8384
&& mkdir -p /build/ \
8485
&& git clone https://github.com/timescale/timescaledb /build/timescaledb \
8586
\
@@ -125,8 +126,8 @@ RUN set -ex \
125126
/var/tmp/* \
126127
\
127128
# Update shared_preload_libraries
128-
&& sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'citus,timescaledb'/g" /opt/bitnami/postgresql/conf/postgresql.conf
129-
129+
&& sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'citus,timescaledb,postgis'/g" /opt/bitnami/postgresql/conf/postgresql.conf
130+
130131
USER 1001
131132

132133
ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ]

bitnami/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ NAME=timescaledb
44
ORG=timescaledev
55
PG_VER=pg15
66
CITUS_VERSION="11.2.0"
7+
POSTGIS_VERSION=3.1.4
78
PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
89

910
TS_VERSION=main
@@ -22,7 +23,7 @@ default: image
2223
.build_$(TS_VERSION)_$(PG_VER): Dockerfile
2324
test -n "$(TS_VERSION)" # TS_VERSION
2425
test -n "$(PREV_TS_VERSION)" # PREV_TS_VERSION
25-
docker build -f ./Dockerfile --build-arg PG_VERSION=$(PG_VER_NUMBER) --build-arg TS_VERSION=$(TS_VERSION) --build-arg PREV_IMAGE=$(PREV_IMAGE) --build-arg CITUS_VERSION=$(CITUS_VERSION) $(TAG) ..
26+
docker build -f ./Dockerfile --build-arg PG_VERSION=$(PG_VER_NUMBER) --build-arg TS_VERSION=$(TS_VERSION) --build-arg PREV_IMAGE=$(PREV_IMAGE) --build-arg CITUS_VERSION=$(CITUS_VERSION) --build-arg POSTGIS_VERSION=$(POSTGIS_VERSION) $(TAG) ..
2627
touch .build_$(TS_VERSION)_$(PG_VER)-bitnami
2728

2829
image: .build_$(TS_VERSION)_$(PG_VER)

bitnami/timescaledb-bitnami-entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
22

3-
# We have to use the Bitnami configuration variable to add TimescaleDB and Citus to
3+
# We have to use the Bitnami configuration variable to add TimescaleDB, Citus, and PostGIS to
44
# the shared preload list, or else it gets overwritten.
55
if [ -z "$POSTGRESQL_SHARED_PRELOAD_LIBRARIES" ]
66
then
7-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb"
7+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,postgis"
88
else
9-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
9+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,postgis,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
1010
fi
1111
export POSTGRESQL_SHARED_PRELOAD_LIBRARIES
1212

0 commit comments

Comments
 (0)