Set DB image based on arch

This commit is contained in:
Mayel de Borniol 2022-10-17 14:02:24 +13:00
parent 2b892c52e4
commit 3dbbf6bd17
6 changed files with 8 additions and 7 deletions

View file

@ -24,7 +24,7 @@ jobs:
ENCRYPTION_SALT: "l+QT/gkdX722f57qSAUc+bZcqm5ZduXY4D0hp0glEiKdR267JsZ1/CZlrlhADcD8kzuaZGFWvJ2dlr6sujbzGQV5e04lKVIsZh3gfd8eqQBckIqH6L8TDRRz4M07YE+F" ENCRYPTION_SALT: "l+QT/gkdX722f57qSAUc+bZcqm5ZduXY4D0hp0glEiKdR267JsZ1/CZlrlhADcD8kzuaZGFWvJ2dlr6sujbzGQV5e04lKVIsZh3gfd8eqQBckIqH6L8TDRRz4M07YE+F"
services: services:
postgres: postgres:
image: postgis/postgis:12-3.2-alpine image: postgis/postgis:12-3.3-alpine
env: env:
POSTGRES_DB: bonfire_test POSTGRES_DB: bonfire_test
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -112,7 +112,7 @@ jobs:
# services: # services:
# postgres: # postgres:
# # image: postgres # # image: postgres
# image: postgis/postgis:12-3.2-alpine # image: postgis/postgis:12-3.3-alpine
# env: # env:
# POSTGRES_DB: bonfire_test # POSTGRES_DB: bonfire_test
# POSTGRES_PASSWORD: postgres # POSTGRES_PASSWORD: postgres

View file

@ -22,7 +22,6 @@ UPLOAD_LIMIT=20000000
# ==================================== # ====================================
# You should not have to edit any of the following ones: # You should not have to edit any of the following ones:
POSTGRES_HOST=localhost POSTGRES_HOST=localhost
DB_DOCKER_IMAGE=postgis/postgis:12-3.2-alpine
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
REPLACE_OS_VARS=true REPLACE_OS_VARS=true

View file

@ -20,7 +20,6 @@ UPLOAD_LIMIT=20000000
# ==================================== # ====================================
# You should not have to edit any of the following ones: # You should not have to edit any of the following ones:
POSTGRES_HOST=localhost POSTGRES_HOST=localhost
DB_DOCKER_IMAGE=postgis/postgis:12-3.2-alpine
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
REPLACE_OS_VARS=true REPLACE_OS_VARS=true

View file

@ -20,7 +20,6 @@ UPLOAD_LIMIT=20000000
# ==================================== # ====================================
# You should not have to edit any of the following ones: # You should not have to edit any of the following ones:
POSTGRES_HOST=localhost POSTGRES_HOST=localhost
DB_DOCKER_IMAGE=postgres:12-alpine
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
REPLACE_OS_VARS=true REPLACE_OS_VARS=true

View file

@ -21,7 +21,6 @@ UPLOAD_LIMIT=20000000
# You should not have to edit any of the following ones: # You should not have to edit any of the following ones:
APP_NAME=reflow APP_NAME=reflow
POSTGRES_HOST=localhost POSTGRES_HOST=localhost
DB_DOCKER_IMAGE=postgis/postgis:12-3.2-alpine
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
REPLACE_OS_VARS=true REPLACE_OS_VARS=true

View file

@ -16,12 +16,13 @@ WITH_DOCKER := env_var_or_default('WITH_DOCKER', "total")
MIX_ENV := env_var_or_default('MIX_ENV', "dev") MIX_ENV := env_var_or_default('MIX_ENV', "dev")
DB_DOCKER_IMAGE := if arch() == "aarch64" { "ghcr.io/baosystems/postgis:12-3.3" } else { env_var_or_default('DB_DOCKER_IMAGE', "postgis/postgis:12-3.3-alpine") }
## Other configs - edit these here if necessary ## Other configs - edit these here if necessary
FORKS_PATH := "forks/" FORKS_PATH := "forks/"
ORG_NAME := "bonfirenetworks" ORG_NAME := "bonfirenetworks"
APP_NAME := "bonfire" APP_NAME := "bonfire"
APP_VSN_EXTRA := "beta" APP_VSN_EXTRA := "beta"
DB_DOCKER_IMAGE := env_var_or_default('DB_DOCKER_IMAGE', "postgis/postgis:12-3.2-alpine")
APP_REL_DOCKERFILE :="Dockerfile.release" APP_REL_DOCKERFILE :="Dockerfile.release"
APP_REL_DOCKERCOMPOSE :="docker-compose.release.yml" APP_REL_DOCKERCOMPOSE :="docker-compose.release.yml"
APP_REL_CONTAINER := APP_NAME + "_release" APP_REL_CONTAINER := APP_NAME + "_release"
@ -92,6 +93,7 @@ pre-init:
@rm -rf ./data/current_flavour @rm -rf ./data/current_flavour
@ln -sf ../$FLAVOUR_PATH ./data/current_flavour @ln -sf ../$FLAVOUR_PATH ./data/current_flavour
@ln -sf ./config/$MIX_ENV/.env ./.env @ln -sf ./config/$MIX_ENV/.env ./.env
@mkdir -p priv/static/public
init: pre-init services init: pre-init services
@echo "Light that fire... $APP_NAME with $FLAVOUR flavour in $MIX_ENV - docker:$WITH_DOCKER - $APP_VSN - $APP_BUILD - $FLAVOUR_PATH - {{os_family()}}/{{os()}} on {{arch()}}" @echo "Light that fire... $APP_NAME with $FLAVOUR flavour in $MIX_ENV - docker:$WITH_DOCKER - $APP_VSN - $APP_BUILD - $FLAVOUR_PATH - {{os_family()}}/{{os()}} on {{arch()}}"
@ -511,6 +513,9 @@ rel-services:
#### DOCKER-SPECIFIC COMMANDS #### #### DOCKER-SPECIFIC COMMANDS ####
dc *args='':
docker-compose $@
# Start background docker services (eg. db and search backends). # Start background docker services (eg. db and search backends).
@services: @services:
{{ if MIX_ENV == "prod" { "just rel-services" } else { "just dev-services" } }} {{ if MIX_ENV == "prod" { "just rel-services" } else { "just dev-services" } }}