feat: support config for order limits

This commit is contained in:
decentral1se 2021-12-23 19:45:57 +01:00
parent 1875ea1c09
commit 7e7e8af313
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
4 changed files with 7 additions and 3 deletions

View File

@ -18,6 +18,8 @@ FOODCOOP_HELP_URL=https://order.example.org
FOODCOOP_TIME_ZONE=Amsterdam
FOODCOOP_FOOTER='<a href="https://example.org/">example</a> hosted by <a href="https://yourhoster.org">Your Tech Co-op</a>.'
USE_APPLE_POINTS=false
STOP_ORDERING_UNDER=75
MINIMUM_BALANCE=0
# database settings
MYSQL_DB=foodsoft

View File

@ -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

View File

@ -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

View File

@ -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