Skip to content

Commit

Permalink
Feature/extension h3 (#428)
Browse files Browse the repository at this point in the history
* Adding h3 library installs to enable h3, h3_postgis extensions

* enable h3 extensions by default if env var POSTGRES_MULTIPLE_EXTENSIONS is not set

* Fix build since we migrated to new base image

* do not activate h3 by default for backward compatibility

* upgrade workflows to use bookworm

* fix pip install

---------

Co-authored-by: Martino <[email protected]>
Co-authored-by: mazano <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2023
1 parent e808ce6 commit 56643f4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
# imageVersion:
# description: Base distro image version/release
# required: true
# default: bullseye
# default: bookworm
# imageVariant:
# description: Base image variant
# required: true
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- init_scripts
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- 3
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
# imageVersion:
# description: Base distro image version/release
# required: true
# default: bullseye
# default: bookworm
# imageVariant:
# description: Base image variant
# required: true
Expand All @@ -36,7 +36,7 @@ jobs:
- 3
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ RUN set -eux \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
locales gnupg2 wget ca-certificates rpl pwgen software-properties-common iputils-ping \
apt-transport-https curl gettext \
&& dpkg-divert --local --rename --add /sbin/initctl

RUN apt-get -y update; apt-get -y install build-essential autoconf libxml2-dev zlib1g-dev netcat-openbsd gdal-bin \
apt-transport-https curl gettext pgxnclient cmake && \
apt-get -y install build-essential autoconf libxml2-dev zlib1g-dev netcat-openbsd gdal-bin \
figlet toilet gosu; \
# verify that the binary works
gosu nobody true
gosu nobody true && \
dpkg-divert --local --rename --add /sbin/initctl


# Generating locales takes a long time. Utilize caching by runnig it by itself
# early in the build process.
Expand All @@ -56,6 +56,8 @@ RUN if [ -z "${GENERATE_ALL_LOCALE}" ] || [ $GENERATE_ALL_LOCALE -eq 0 ]; \
&& /usr/sbin/locale-gen

RUN update-locale ${LANG}


# Cleanup resources
RUN apt-get -y --purge autoremove \
&& apt-get clean \
Expand Down Expand Up @@ -105,7 +107,8 @@ RUN set -eux \
postgresql-${POSTGRES_MAJOR_VERSION}-postgis-${POSTGIS_MAJOR_VERSION}-scripts \
postgresql-plpython3-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-pgrouting \
postgresql-server-dev-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-cron \
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw && \
pgxn install h3

# TODO a case insensitive match would be more robust
RUN if [ "${BUILD_TIMESCALE}" = "true" ]; then \
Expand All @@ -128,6 +131,8 @@ cd pointcloud-master && \
./autogen.sh && ./configure && make -j 4 && make install && \
cd .. && rm -Rf pointcloud-master



# Cleanup resources
RUN apt-get -y --purge autoremove \
&& apt-get clean \
Expand Down Expand Up @@ -166,4 +171,4 @@ RUN set -eux \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install -r /lib/utils/requirements.txt
RUN pip3 install -r /lib/utils/requirements.txt --break-system-packages

0 comments on commit 56643f4

Please sign in to comment.