Merge pull request #3116 from vlauciani/issue_to_add_version_for_docker_postgis

PostGIS - 1)Add PostGIS VERSION and 2)add option to install 'pgsql-http' ext
This commit is contained in:
Shao Yu-Lung (Allen) 2022-01-11 14:39:03 +08:00 committed by GitHub
commit fc4b534e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 2 deletions

View File

@ -446,6 +446,10 @@ POSTGRES_PASSWORD=secret
POSTGRES_PORT=5432
POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d
### POSTGRES-POSTGIS ##############################################
POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false
### SQS ##############################################
SQS_NODE_HOST_PORT=9324

View File

@ -622,7 +622,11 @@ services:
### PostgreSQL PostGis ###################################
postgres-postgis:
build: ./postgres-postgis
build:
context: ./postgres-postgis
args:
- POSTGRES_VERSION=${POSTGRES_VERSION}
- INSTALL_PGSQL_HTTP_FOR_POSTGIS13=${POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13}
volumes:
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
ports:

View File

@ -1,7 +1,27 @@
FROM postgis/postgis:latest
ARG POSTGRES_VERSION=latest
FROM postgis/postgis:${POSTGRES_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
ARG INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false
RUN if [ ${INSTALL_PGSQL_HTTP_FOR_POSTGIS13} = true ]; then \
apt-get clean \
&& apt-get update -yqq \
&& apt-get install -y \
git \
make \
gcc \
libcurl4-openssl-dev \
postgresql-server-dev-13 \
postgresql-13-cron \
&& git clone --recursive https://github.com/pramsey/pgsql-http.git \
&& cd pgsql-http/ \
&& make \
&& make install \
&& apt-get clean \
;fi
CMD ["postgres"]
EXPOSE 5432