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"
services:
postgres:
image: postgis/postgis:12-3.2-alpine
image: postgis/postgis:12-3.3-alpine
env:
POSTGRES_DB: bonfire_test
POSTGRES_PASSWORD: postgres
@ -112,7 +112,7 @@ jobs:
# services:
# postgres:
# # image: postgres
# image: postgis/postgis:12-3.2-alpine
# image: postgis/postgis:12-3.3-alpine
# env:
# POSTGRES_DB: bonfire_test
# POSTGRES_PASSWORD: postgres

View file

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

View file

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

View file

@ -20,7 +20,6 @@ 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
LANGUAGE=en_US.UTF-8
REPLACE_OS_VARS=true

View file

@ -21,7 +21,6 @@ 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.2-alpine
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
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")
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
FORKS_PATH := "forks/"
ORG_NAME := "bonfirenetworks"
APP_NAME := "bonfire"
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_DOCKERCOMPOSE :="docker-compose.release.yml"
APP_REL_CONTAINER := APP_NAME + "_release"
@ -92,6 +93,7 @@ pre-init:
@rm -rf ./data/current_flavour
@ln -sf ../$FLAVOUR_PATH ./data/current_flavour
@ln -sf ./config/$MIX_ENV/.env ./.env
@mkdir -p priv/static/public
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()}}"
@ -511,6 +513,9 @@ rel-services:
#### DOCKER-SPECIFIC COMMANDS ####
dc *args='':
docker-compose $@
# Start background docker services (eg. db and search backends).
@services:
{{ if MIX_ENV == "prod" { "just rel-services" } else { "just dev-services" } }}