-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from ImreSamu/20240414_update_PostGIS3.5_debian
Update to PostGIS 3.5 debian
- Loading branch information
Showing
49 changed files
with
232 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
# placeholder Dockerfile | ||
# Debian version of postgis is not detected! | ||
# This is an autogenerated message of ./update.sh | ||
# | ||
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. | ||
# | ||
|
||
FROM postgres:16-bullseye | ||
|
||
LABEL maintainer="PostGIS Project - https://postgis.net" \ | ||
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 16 bullseye" \ | ||
org.opencontainers.image.source="https://github.com/postgis/docker-postgis" | ||
|
||
ENV POSTGIS_MAJOR 3 | ||
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 | ||
|
||
RUN apt-get update \ | ||
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ | ||
&& apt-get install -y --no-install-recommends \ | ||
# ca-certificates: for accessing remote raster files; | ||
# fix: https://github.com/postgis/docker-postgis/issues/307 | ||
ca-certificates \ | ||
\ | ||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ | ||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /docker-entrypoint-initdb.d | ||
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh | ||
COPY ./update-postgis.sh /usr/local/bin | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Perform all actions as $POSTGRES_USER | ||
export PGUSER="$POSTGRES_USER" | ||
|
||
# Create the 'template_postgis' template db | ||
"${psql[@]}" <<- 'EOSQL' | ||
CREATE DATABASE template_postgis IS_TEMPLATE true; | ||
EOSQL | ||
|
||
# Load PostGIS into both template_database and $POSTGRES_DB | ||
for DB in template_postgis "$POSTGRES_DB"; do | ||
echo "Loading PostGIS extensions into $DB" | ||
"${psql[@]}" --dbname="$DB" <<-'EOSQL' | ||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
CREATE EXTENSION IF NOT EXISTS postgis_topology; | ||
-- Reconnect to update pg_setting.resetval | ||
-- See https://github.com/postgis/docker-postgis/issues/288 | ||
\c | ||
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; | ||
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; | ||
EOSQL | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Perform all actions as $POSTGRES_USER | ||
export PGUSER="$POSTGRES_USER" | ||
|
||
POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" | ||
|
||
# Load PostGIS into both template_database and $POSTGRES_DB | ||
for DB in template_postgis "$POSTGRES_DB" "${@}"; do | ||
echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" | ||
psql --dbname="$DB" -c " | ||
-- Upgrade PostGIS (includes raster) | ||
CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; | ||
-- Upgrade Topology | ||
CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; | ||
-- Install Tiger dependencies in case not already installed | ||
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; | ||
-- Upgrade US Tiger Geocoder | ||
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; | ||
" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
# placeholder Dockerfile | ||
# Debian version of postgis is not detected! | ||
# This is an autogenerated message of ./update.sh | ||
# | ||
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. | ||
# | ||
|
||
FROM postgres:17-bullseye | ||
|
||
LABEL maintainer="PostGIS Project - https://postgis.net" \ | ||
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 17 bullseye" \ | ||
org.opencontainers.image.source="https://github.com/postgis/docker-postgis" | ||
|
||
ENV POSTGIS_MAJOR 3 | ||
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 | ||
|
||
RUN apt-get update \ | ||
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ | ||
&& apt-get install -y --no-install-recommends \ | ||
# ca-certificates: for accessing remote raster files; | ||
# fix: https://github.com/postgis/docker-postgis/issues/307 | ||
ca-certificates \ | ||
\ | ||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ | ||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /docker-entrypoint-initdb.d | ||
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh | ||
COPY ./update-postgis.sh /usr/local/bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Perform all actions as $POSTGRES_USER | ||
export PGUSER="$POSTGRES_USER" | ||
|
||
# Create the 'template_postgis' template db | ||
"${psql[@]}" <<- 'EOSQL' | ||
CREATE DATABASE template_postgis IS_TEMPLATE true; | ||
EOSQL | ||
|
||
# Load PostGIS into both template_database and $POSTGRES_DB | ||
for DB in template_postgis "$POSTGRES_DB"; do | ||
echo "Loading PostGIS extensions into $DB" | ||
"${psql[@]}" --dbname="$DB" <<-'EOSQL' | ||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
CREATE EXTENSION IF NOT EXISTS postgis_topology; | ||
-- Reconnect to update pg_setting.resetval | ||
-- See https://github.com/postgis/docker-postgis/issues/288 | ||
\c | ||
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; | ||
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; | ||
EOSQL | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Perform all actions as $POSTGRES_USER | ||
export PGUSER="$POSTGRES_USER" | ||
|
||
POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" | ||
|
||
# Load PostGIS into both template_database and $POSTGRES_DB | ||
for DB in template_postgis "$POSTGRES_DB" "${@}"; do | ||
echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" | ||
psql --dbname="$DB" -c " | ||
-- Upgrade PostGIS (includes raster) | ||
CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; | ||
-- Upgrade Topology | ||
CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; | ||
-- Install Tiger dependencies in case not already installed | ||
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; | ||
-- Upgrade US Tiger Geocoder | ||
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; | ||
ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; | ||
" | ||
done |
Oops, something went wrong.