Feature/extension h3 (#428)

* 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 <martino.boni@generali.com>
Co-authored-by: mazano <addloe@gmail.com>
pull/441/head
Tenz 2023-08-06 05:02:07 +02:00 zatwierdzone przez GitHub
rodzic e808ce66bb
commit 56643f4d05
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 17 dodań i 12 usunięć

Wyświetl plik

@ -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
@ -41,7 +41,7 @@ jobs:
- init_scripts
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
@ -96,7 +96,7 @@ jobs:
- 3
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3

Wyświetl plik

@ -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
@ -36,7 +36,7 @@ jobs:
- 3
include:
- distro: debian
imageVersion: bullseye
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3

Wyświetl plik

@ -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.
@ -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 \
@ -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 \
@ -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 \
@ -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