From 18bf3a7b205816921faa0acc768fa8f99c8add71 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 10:56:58 +0100 Subject: [PATCH 1/9] Update .env.example --- .env.example | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.env.example b/.env.example index 168ae64..64ee615 100644 --- a/.env.example +++ b/.env.example @@ -443,6 +443,11 @@ POSTGRES_PASSWORD=secret POSTGRES_PORT=5432 POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d +### POSTGIS ############################################## + +POSTGIS_VERSION=latest +POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false + ### SQS ############################################## SQS_NODE_HOST_PORT=9324 From ec4216ed187729a71e32032bd3c9712415fa44a6 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 11:41:46 +0100 Subject: [PATCH 2/9] Update Dockerfile --- postgres-postgis/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres-postgis/Dockerfile b/postgres-postgis/Dockerfile index 3b219f4..56ffb31 100644 --- a/postgres-postgis/Dockerfile +++ b/postgres-postgis/Dockerfile @@ -1,4 +1,5 @@ -FROM postgis/postgis:latest +ARG POSTGRES_VERSION=alpine +FROM postgis/postgis:${POSTGRES_VERSION} LABEL maintainer="Mahmoud Zalt " From 3d2f8074d35768125e9b11f8c34e0babea972603 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 11:43:51 +0100 Subject: [PATCH 3/9] Update docker-compose.yml --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 24035d6..d785cca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -619,7 +619,10 @@ services: ### PostgreSQL PostGis ################################### postgres-postgis: - build: ./postgres-postgis + build: + context: ./postgres-postgis + args: + - POSTGRES_VERSION=${POSTGRES_VERSION} volumes: - ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data ports: @@ -628,6 +631,7 @@ services: - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - INSTALL_PGSQL_HTTP_FOR_POSTGIS13=${POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13} networks: - backend From c6bc9860956166b4de4ca0f8350e9069f397516c Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 11:50:43 +0100 Subject: [PATCH 4/9] Update Dockerfile --- postgres-postgis/Dockerfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/postgres-postgis/Dockerfile b/postgres-postgis/Dockerfile index 56ffb31..99b7573 100644 --- a/postgres-postgis/Dockerfile +++ b/postgres-postgis/Dockerfile @@ -1,8 +1,25 @@ -ARG POSTGRES_VERSION=alpine +ARG POSTGRES_VERSION=latest FROM postgis/postgis:${POSTGRES_VERSION} LABEL maintainer="Mahmoud Zalt " +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 From 9c6f4e0a06c4e88e67e790edee2c0f8a0c16cac9 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 11:58:32 +0100 Subject: [PATCH 5/9] Update Dockerfile --- postgres-postgis/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-postgis/Dockerfile b/postgres-postgis/Dockerfile index 99b7573..7573cc4 100644 --- a/postgres-postgis/Dockerfile +++ b/postgres-postgis/Dockerfile @@ -9,7 +9,7 @@ RUN if [ ${INSTALL_PGSQL_HTTP_FOR_POSTGIS13} = true ]; then \ && apt-get install -y \ git \ make \ - gcc \ + gcc \ libcurl4-openssl-dev \ postgresql-server-dev-13 \ postgresql-13-cron \ From 4885f9ac2dd3476273745f5821c5ab1061a3d798 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 12:02:53 +0100 Subject: [PATCH 6/9] Update .env.example --- .env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.example b/.env.example index 64ee615..097afa4 100644 --- a/.env.example +++ b/.env.example @@ -445,7 +445,6 @@ POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d ### POSTGIS ############################################## -POSTGIS_VERSION=latest POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false ### SQS ############################################## From 3d2194301e97fb5dd426fcb110179278dfef22de Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 21 Dec 2021 12:05:56 +0100 Subject: [PATCH 7/9] Update .env.example --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 097afa4..1116e63 100644 --- a/.env.example +++ b/.env.example @@ -443,7 +443,7 @@ POSTGRES_PASSWORD=secret POSTGRES_PORT=5432 POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d -### POSTGIS ############################################## +### POSTGRES-POSTGIS ############################################## POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false From cf6e2cd843fb378ffcaa2d3a4a2e9ba8eb8aa0d1 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Wed, 22 Dec 2021 09:17:25 +0100 Subject: [PATCH 8/9] Update Dockerfile --- postgres-postgis/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgres-postgis/Dockerfile b/postgres-postgis/Dockerfile index 7573cc4..a25ea78 100644 --- a/postgres-postgis/Dockerfile +++ b/postgres-postgis/Dockerfile @@ -3,6 +3,8 @@ FROM postgis/postgis:${POSTGRES_VERSION} LABEL maintainer="Mahmoud Zalt " +ARG INSTALL_PGSQL_HTTP_FOR_POSTGIS13=false + RUN if [ ${INSTALL_PGSQL_HTTP_FOR_POSTGIS13} = true ]; then \ apt-get clean \ && apt-get update -yqq \ From 3a8ff2c329842f476b60a9282ae72825cc02f52d Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Wed, 22 Dec 2021 09:18:33 +0100 Subject: [PATCH 9/9] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d785cca..5006f19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -623,6 +623,7 @@ services: 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: @@ -631,7 +632,6 @@ services: - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - INSTALL_PGSQL_HTTP_FOR_POSTGIS13=${POSTGIS_INSTALL_PGSQL_HTTP_FOR_POSTGIS13} networks: - backend