From f1ae6c651149ab1398fa9f43ca9b0122213894e7 Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Mon, 13 Dec 2021 07:44:34 +1300 Subject: [PATCH] make postgis optional based on flavour --- .github/workflows/bonfire.yaml | 5 ++--- Makefile | 1 + docker-compose.release.yml | 2 +- docker-compose.yml | 2 +- flavours/classic/config/templates/public.env | 1 + flavours/cooperation/config/templates/public.env | 1 + flavours/haha/config/templates/public.env | 1 + flavours/reflow/config/templates/public.env | 1 + 8 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bonfire.yaml b/.github/workflows/bonfire.yaml index a2e33bccce..6bb33e860c 100755 --- a/.github/workflows/bonfire.yaml +++ b/.github/workflows/bonfire.yaml @@ -23,8 +23,7 @@ jobs: ENCRYPTION_SALT: "l+QT/gkdX722f57qSAUc+bZcqm5ZduXY4D0hp0glEiKdR267JsZ1/CZlrlhADcD8kzuaZGFWvJ2dlr6sujbzGQV5e04lKVIsZh3gfd8eqQBckIqH6L8TDRRz4M07YE+F" services: postgres: - # image: postgres - image: postgis/postgis:12-3.0-alpine + image: postgres:12-alpine env: POSTGRES_DB: bonfire_test POSTGRES_PASSWORD: postgres @@ -103,7 +102,7 @@ jobs: services: postgres: # image: postgres - image: postgis/postgis:12-3.0-alpine + image: postgis/postgis:12-3.1-alpine env: POSTGRES_DB: bonfire_test POSTGRES_PASSWORD: postgres diff --git a/Makefile b/Makefile index 9038f3547d..de0282de0a 100755 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ APP_REL_DOCKERCOMPOSE=docker-compose.release.yml APP_VSN ?= `grep -m 1 'version:' mix.exs | cut -d '"' -f2` APP_BUILD ?= `git rev-parse --short HEAD` APP_DOCKER_REPO="$(ORG_NAME)/$(APP_NAME)-$(FLAVOUR)" +DB_DOCKER_IMAGE ?= postgis/postgis:12-3.1-alpine #### GENERAL SETUP RELATED COMMANDS #### diff --git a/docker-compose.release.yml b/docker-compose.release.yml index e5b3157f9f..21d86e9a8a 100755 --- a/docker-compose.release.yml +++ b/docker-compose.release.yml @@ -39,7 +39,7 @@ services: source: ./data/uploads target: /frontend/uploads db: - image: postgis/postgis:12-3.0-alpine + image: ${DB_DOCKER_IMAGE} restart: always volumes: - "./data/postgres/prod:/var/lib/postgresql/data" diff --git a/docker-compose.yml b/docker-compose.yml index 1c1cea78a1..8cc7dd4709 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: tty: true # like docker run -t # user: $UID:$GID db: - image: postgis/postgis:12-3.1-alpine + image: ${DB_DOCKER_IMAGE} # volumes: # - ./data/postgres/dev:/var/lib/postgresql/data:z # - /etc/passwd:/etc/passwd:ro diff --git a/flavours/classic/config/templates/public.env b/flavours/classic/config/templates/public.env index 1c58f6ffe8..dbeb9b41ac 100755 --- a/flavours/classic/config/templates/public.env +++ b/flavours/classic/config/templates/public.env @@ -21,6 +21,7 @@ UPLOAD_LIMIT=20000000 # ==================================== # You should not have to edit any of the following ones: POSTGRES_HOST=localhost +DB_DOCKER_IMAGE=postgres:12-alpine LANG=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true diff --git a/flavours/cooperation/config/templates/public.env b/flavours/cooperation/config/templates/public.env index 965ac07c1e..1f12b3fd07 100644 --- a/flavours/cooperation/config/templates/public.env +++ b/flavours/cooperation/config/templates/public.env @@ -21,6 +21,7 @@ UPLOAD_LIMIT=20000000 # ==================================== # You should not have to edit any of the following ones: POSTGRES_HOST=localhost +DB_DOCKER_IMAGE=postgis/postgis:12-3.1-alpine LANG=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true diff --git a/flavours/haha/config/templates/public.env b/flavours/haha/config/templates/public.env index 7d54637758..dbc0cff415 100644 --- a/flavours/haha/config/templates/public.env +++ b/flavours/haha/config/templates/public.env @@ -21,6 +21,7 @@ UPLOAD_LIMIT=20000000 # ==================================== # You should not have to edit any of the following ones: POSTGRES_HOST=localhost +DB_DOCKER_IMAGE=postgres:12-alpine LANG=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true diff --git a/flavours/reflow/config/templates/public.env b/flavours/reflow/config/templates/public.env index bcc45ab0dc..6ba09f0e73 100755 --- a/flavours/reflow/config/templates/public.env +++ b/flavours/reflow/config/templates/public.env @@ -22,6 +22,7 @@ UPLOAD_LIMIT=20000000 # You should not have to edit any of the following ones: APP_NAME=reflow POSTGRES_HOST=localhost +DB_DOCKER_IMAGE=postgis/postgis:12-3.1-alpine LANG=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true