diff --git a/.env.sample b/.env.sample index 9ef097e..be0fc56 100644 --- a/.env.sample +++ b/.env.sample @@ -18,6 +18,8 @@ FOODCOOP_HELP_URL=https://order.example.org FOODCOOP_TIME_ZONE=Amsterdam FOODCOOP_FOOTER='example hosted by Your Tech Co-op.' USE_APPLE_POINTS=false +STOP_ORDERING_UNDER=75 +MINIMUM_BALANCE=0 # database settings MYSQL_DB=foodsoft diff --git a/abra.sh b/abra.sh index 61c6aa2..04144c8 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export APP_CONFIG_VERSION=v3 +export APP_CONFIG_VERSION=v4 export DB_CONFIG_VERSION=v1 export ENTRYPOINT_VERSION=v1 export PRODUCTION_ENV_VERSION=v1 diff --git a/app_config.yml.tmpl b/app_config.yml.tmpl index febd592..e9a528e 100644 --- a/app_config.yml.tmpl +++ b/app_config.yml.tmpl @@ -59,14 +59,14 @@ default: &defaults # Ordergroups, which have less than 75 apples should not be allowed to make new orders # Comment out this option to activate this restriction - #stop_ordering_under: 75 + stop_ordering_under: {{ env "STOP_ORDERING_UNDER" }} # Comment out to completely hide apple points (be sure to comment stop_ordering_under) use_apple_points: {{ env "USE_APPLE_POINTS" }} # ordergroups can only order when their balance is higher than or equal to this # not fully enforced right now, since the check is only client-side - #minimum_balance: 0 + minimum_balance: {{ env "MINIMUM_BALANCE" }} # how many days there are between two periodic tasks #tasks_period_days: 7 diff --git a/compose.yml b/compose.yml index 3c0eaa9..054449b 100644 --- a/compose.yml +++ b/compose.yml @@ -19,6 +19,7 @@ x-env: &env FOODCOOP_TIME_ZONE: FOODCOOP_ZIP_CODE: LOG_LEVEL: + MINIMUM_BALANCE: MYSQL_DB: foodsoft MYSQL_HOST: db MYSQL_PORT: 3306 @@ -33,6 +34,7 @@ x-env: &env SMTP_PASSWORD_FILE: /run/secrets/smtp_password SMTP_PORT: SMTP_USER_NAME: + STOP_ORDERING_UNDER: USE_APPLE_POINTS: x-configs: &configs