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:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user