From 7c0ad69d4e45229ba729c63bb4a85d710715a591 Mon Sep 17 00:00:00 2001
From: 3wc <3wc@doesthisthing.work>
Date: Sun, 21 Nov 2021 21:23:35 +0200
Subject: [PATCH 01/16] Mass README update
[ci skip]
---
README.md | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/README.md b/README.md
index c7d26ea..f233fcb 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,16 @@
Configuration based on the good work of [foodcoops.net](https://github.com/foodcoops/foodcoops.net).
New instances automatically set the initial administrator login to username: `admin` / password: `secret`.
+
+
+
+- **Category**: Apps
+- **Status**:
+- **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
+- **Healthcheck**:
+- **Backups**:
+- **Email**:
+- **Tests**:
+- **SSO**:
+
+
From f8c7a1c036d29b8d786d1d67425e3c5e1aa852ac Mon Sep 17 00:00:00 2001
From: 3wc <3wc@doesthisthing.work>
Date: Mon, 22 Nov 2021 13:42:03 +0200
Subject: [PATCH 02/16] chore: fix README bullet formatting
[ci skip]
---
README.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index f233fcb..32a1629 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,13 @@ Configuration based on the good work of [foodcoops.net](https://github.com/foodc
-- **Category**: Apps
-- **Status**:
-- **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
-- **Healthcheck**:
-- **Backups**:
-- **Email**:
-- **Tests**:
-- **SSO**:
+* **Category**: Apps
+* **Status**:
+* **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
+* **Healthcheck**:
+* **Backups**:
+* **Email**:
+* **Tests**:
+* **SSO**:
From 2fd3fac42dae450b4a767001aa8b893fd38c8fe2 Mon Sep 17 00:00:00 2001
From: 3wc <3wc@doesthisthing.work>
Date: Mon, 22 Nov 2021 14:32:23 +0200
Subject: [PATCH 03/16] fix: string quoting in FOODCOOP_FOOTER var
---
.env.sample | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.env.sample b/.env.sample
index e4cc10a..41341bb 100644
--- a/.env.sample
+++ b/.env.sample
@@ -17,7 +17,7 @@ FOODCOOP_ZIP_CODE=XXX
FOODCOOP_HOMEPAGE=https://order.example.org
FOODCOOP_HELP_URL=https://order.example.org
FOODCOOP_TIME_ZONE=Amsterdam
-FOODCOOP_FOOTER="example hosted by Your Tech Co-op."
+FOODCOOP_FOOTER='example hosted by Your Tech Co-op.'
# database settings
MYSQL_DB=foodsoft
From a5f871950ca8f063dbeae9dc18c9c34420e5bb3a Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 13:50:13 +0100
Subject: [PATCH 04/16] chore: remove old file
---
renovate.json | 3 ---
1 file changed, 3 deletions(-)
delete mode 100644 renovate.json
diff --git a/renovate.json b/renovate.json
deleted file mode 100644
index 7190a60..0000000
--- a/renovate.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json"
-}
From 1adc2477a655a0e531fb1e62109fdd84e4d99647 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 13:50:19 +0100
Subject: [PATCH 05/16] chore: formatting
---
compose.yml | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/compose.yml b/compose.yml
index 6752e41..ee1ccda 100644
--- a/compose.yml
+++ b/compose.yml
@@ -1,4 +1,6 @@
+---
version: "3.8"
+
x-env: &env
DOMAIN:
EMAIL_ERROR:
@@ -31,6 +33,7 @@ x-env: &env
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
SMTP_PORT:
SMTP_USER_NAME:
+
x-configs: &configs
- source: app_config
target: /usr/src/app/config/app_config.yml
@@ -41,10 +44,12 @@ x-configs: &configs
- source: entrypoint
target: /usr/src/app/docker-entrypoint.sh
mode: 0555
+
x-secrets: &secrets
- db_password
- secret_key_base
- smtp_password
+
services:
app:
image: foodcoops/foodsoft:4.7.1
@@ -69,11 +74,12 @@ services:
order: start-first
labels:
- "traefik.enable=true"
- - "traefik.http.routers.foodsoft.rule=Host(`${DOMAIN}`)"
- - "traefik.http.routers.foodsoft.entrypoints=web-secure"
- - "traefik.http.services.foodsoft.loadbalancer.server.port=3000"
- - "traefik.http.routers.foodsoft.tls.certresolver=${LETS_ENCRYPT_ENV}"
- - coop-cloud.${STACK_NAME}.app.version=4.7.1-
+ - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
+ - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
+ - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
+ - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
+ - "coop-cloud.${STACK_NAME}.version=1.0.0+4.7.1"
+
cron:
image: foodcoops/foodsoft:4.7.1
environment:
@@ -85,7 +91,7 @@ services:
networks:
- internal
deploy:
- labels: ['coop-cloud.${STACK_NAME}.cron.version=4.7.1-']
+ labels: ["coop-cloud.${STACK_NAME}.cron.version=4.7.1-"]
worker:
image: foodcoops/foodsoft:4.7.1
environment:
@@ -96,8 +102,7 @@ services:
secrets: *secrets
networks:
- internal
- deploy:
- labels: ['coop-cloud.${STACK_NAME}.worker.version=4.7.1-']
+
smtp:
image: foodcoops/foodsoft:4.7.1
configs: *configs
@@ -117,7 +122,7 @@ services:
- "traefik.tcp.routers.foodsoft-smtp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.foodsoft-smtp.entrypoints=foodsoft-smtp"
- "traefik.tcp.services.foodsoft-smtp.loadbalancer.server.port=${SMTP_SERVER_PORT}"
- - coop-cloud.${STACK_NAME}.smtp.version=4.7.1-
+
db:
image: "mariadb:10.6"
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci"
@@ -133,20 +138,20 @@ services:
- "db:/var/lib/mysql"
networks:
- internal
- deploy:
- labels: ['coop-cloud.${STACK_NAME}.db.version=10.6-']
+
cache:
image: "redis:6"
networks:
- internal
- deploy:
- labels: ['coop-cloud.${STACK_NAME}.cache.version=6-']
+
networks:
internal:
proxy:
external: true
+
volumes:
db:
+
configs:
app_config:
name: ${STACK_NAME}_app_config_${APP_CONFIG_VERSION}
@@ -164,6 +169,7 @@ configs:
name: ${STACK_NAME}_production_env_${PRODUCTION_ENV_VERSION}
file: production.rb.tmpl
template_driver: golang
+
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
From 66b6992b0b12fd4b64d686dca8870e07d91b281e Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 13:52:26 +0100
Subject: [PATCH 06/16] fix: drop weird chars
---
compose.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compose.yml b/compose.yml
index ee1ccda..10197d6 100644
--- a/compose.yml
+++ b/compose.yml
@@ -60,7 +60,7 @@ services:
configs: *configs
entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
environment:
- !%21merge <<: *env
+ !!merge <<: *env
FOODSOFT_SERVICE: app
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
@@ -83,7 +83,7 @@ services:
cron:
image: foodcoops/foodsoft:4.7.1
environment:
- !%21merge <<: *env
+ !!merge <<: *env
FOODSOFT_SERVICE: cron
configs: *configs
entrypoint: *entrypoint
@@ -95,7 +95,7 @@ services:
worker:
image: foodcoops/foodsoft:4.7.1
environment:
- !%21merge <<: *env
+ !!merge <<: *env
FOODSOFT_SERVICE: worker
configs: *configs
entrypoint: *entrypoint
@@ -109,7 +109,7 @@ services:
entrypoint: *entrypoint
secrets: *secrets
environment:
- !%21merge <<: *env
+ !!merge <<: *env
FOODSOFT_SERVICE: smtp
SMTP_SERVER_HOST:
SMTP_SERVER_PORT:
From c5c0768b10a274769c42672b49f45405fb0f72d0 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 14:37:59 +0100
Subject: [PATCH 07/16] fix: drop that weirdness
---
compose.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compose.yml b/compose.yml
index 10197d6..093b1d9 100644
--- a/compose.yml
+++ b/compose.yml
@@ -60,7 +60,7 @@ services:
configs: *configs
entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
environment:
- !!merge <<: *env
+ <<: *env
FOODSOFT_SERVICE: app
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
@@ -83,7 +83,7 @@ services:
cron:
image: foodcoops/foodsoft:4.7.1
environment:
- !!merge <<: *env
+ <<: *env
FOODSOFT_SERVICE: cron
configs: *configs
entrypoint: *entrypoint
@@ -95,7 +95,7 @@ services:
worker:
image: foodcoops/foodsoft:4.7.1
environment:
- !!merge <<: *env
+ <<: *env
FOODSOFT_SERVICE: worker
configs: *configs
entrypoint: *entrypoint
@@ -109,7 +109,7 @@ services:
entrypoint: *entrypoint
secrets: *secrets
environment:
- !!merge <<: *env
+ <<: *env
FOODSOFT_SERVICE: smtp
SMTP_SERVER_HOST:
SMTP_SERVER_PORT:
From fcd6c261d8246aa1881f9d7fb5f2d3382c1fa474 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 14:43:54 +0100
Subject: [PATCH 08/16] fix: drop label and formatting
---
compose.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compose.yml b/compose.yml
index 093b1d9..83ee75e 100644
--- a/compose.yml
+++ b/compose.yml
@@ -90,8 +90,7 @@ services:
secrets: *secrets
networks:
- internal
- deploy:
- labels: ["coop-cloud.${STACK_NAME}.cron.version=4.7.1-"]
+
worker:
image: foodcoops/foodsoft:4.7.1
environment:
From 5861bc2e848a7946db88feccf06d222e4b935f69 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 15:00:07 +0100
Subject: [PATCH 09/16] chore: formatting
---
README.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 32a1629..7207f20 100644
--- a/README.md
+++ b/README.md
@@ -6,17 +6,17 @@
Configuration based on the good work of [foodcoops.net](https://github.com/foodcoops/foodcoops.net).
- New instances automatically set the initial administrator login to username: `admin` / password: `secret`.
+New instances automatically set the initial administrator login to username: `admin` / password: `secret`.
-* **Category**: Apps
-* **Status**:
-* **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
-* **Healthcheck**:
-* **Backups**:
-* **Email**:
-* **Tests**:
-* **SSO**:
+- **Category**: Apps
+- **Status**:
+- **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
+- **Healthcheck**:
+- **Backups**:
+- **Email**:
+- **Tests**:
+- **SSO**:
From 2a425a48c7550950285101807b94549203584961 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 15:57:00 +0100
Subject: [PATCH 10/16] fix: unbreak quoting
---
abra.sh | 2 +-
app_config.yml.tmpl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/abra.sh b/abra.sh
index d0cdcaa..7007d7c 100644
--- a/abra.sh
+++ b/abra.sh
@@ -1,4 +1,4 @@
-export APP_CONFIG_VERSION=v1
+export APP_CONFIG_VERSION=v2
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 bed97f4..eb02e53 100644
--- a/app_config.yml.tmpl
+++ b/app_config.yml.tmpl
@@ -112,7 +112,7 @@ default: &defaults
# order_by_articles: true
# Page footer (html allowed). Default is a Foodsoft footer. Set to `blank` for no footer.
- page_footer: "{{ env "FOODCOOP_FOOTER" }}"
+ page_footer: {{ env "FOODCOOP_FOOTER" }}
# Custom CSS for the foodcoop
#custom_css: 'body { background-color: #fcffba; }'
From 0438ab5c0303de070fd6c3071215116bb722e7b3 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 17:14:25 +0100
Subject: [PATCH 11/16] fix: remove this override
---
.env.sample | 2 -
compose.yml | 6 ---
production.rb.tmpl | 112 ---------------------------------------------
3 files changed, 120 deletions(-)
delete mode 100644 production.rb.tmpl
diff --git a/.env.sample b/.env.sample
index 41341bb..e7d6f20 100644
--- a/.env.sample
+++ b/.env.sample
@@ -3,8 +3,6 @@ TYPE=foodsoft
DOMAIN=order.example.org
LETS_ENCRYPT_ENV=production
-LOG_LEVEL=":info"
-
# app settings
FOODCOOP_MULTI_INSTALL=true # Best for now, see https://github.com/foodcoops/foodsoft/pull/841
FOODCOOP_NAME=example
diff --git a/compose.yml b/compose.yml
index 83ee75e..b6a7f16 100644
--- a/compose.yml
+++ b/compose.yml
@@ -39,8 +39,6 @@ x-configs: &configs
target: /usr/src/app/config/app_config.yml
- source: db_config
target: /usr/src/app/config/database.yml
- - source: production_env
- target: /usr/src/app/config/environments/production.rb
- source: entrypoint
target: /usr/src/app/docker-entrypoint.sh
mode: 0555
@@ -164,10 +162,6 @@ configs:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
- production_env:
- name: ${STACK_NAME}_production_env_${PRODUCTION_ENV_VERSION}
- file: production.rb.tmpl
- template_driver: golang
secrets:
db_password:
diff --git a/production.rb.tmpl b/production.rb.tmpl
deleted file mode 100644
index 5e40aab..0000000
--- a/production.rb.tmpl
+++ /dev/null
@@ -1,112 +0,0 @@
-# Foodsoft production configuration.
-#
-# This file is in the public domain.
-
-Rails.application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
-
- # Code is not reloaded between requests.
- config.cache_classes = true
-
- # Eager load code on boot. This eager loads most of Rails and
- # your application in memory, allowing both threaded web servers
- # and those relying on copy on write to perform better.
- # Rake tasks automatically ignore this option for performance.
- config.eager_load = true
-
- # Full error reports are disabled and caching is turned on.
- config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
-
- # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
- # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
- # config.require_master_key = true
-
- # Disable serving static files from the `/public` folder by default since
- # Apache or NGINX already handles this.
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
-
- # Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
- config.assets.css_compressor = :sass
-
- # Do not fallback to assets pipeline if a precompiled asset is missed.
- config.assets.compile = false
-
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
- # config.action_controller.asset_host = 'http://assets.example.com'
-
- # Specifies the header that your server uses for sending files.
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
-
- # Mount Action Cable outside main process or domain
- # config.action_cable.mount_path = nil
- # config.action_cable.url = 'wss://example.com/cable'
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
-
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- config.force_ssl = ENV["RAILS_FORCE_SSL"] != "false"
-
- # Set to :debug to see everything in the log.
- config.log_level = {{ env "LOG_LEVEL" }}
-
- # Prepend all log lines with the following tags.
- config.log_tags = [:request_id]
-
- # Don't dump schema in production (especially useful for Docker)
- config.active_record.dump_schema_after_migration = false
-
- # Use a different cache store in production.
- # config.cache_store = :mem_cache_store
-
- config.action_mailer.perform_caching = false
-
- # Ignore bad email addresses and do not raise email delivery errors.
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
- # config.action_mailer.raise_delivery_errors = false
-
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
- # the I18n.default_locale when a translation cannot be found).
- config.i18n.fallbacks = true
-
- # Send deprecation notices to registered listeners.
- config.active_support.deprecation = :notify
-
- # Disable automatic flushing of the log to improve performance.
- # config.autoflush_log = false
-
- # Configure hostname for action mailer (can be overridden in foodcoop config)
- config.action_mailer.default_url_options = { host: `hostname -f`, protocol: 'https' }
-
- if ENV['SMTP_ADDRESS'].present?
- config.action_mailer.delivery_method = :smtp
- config.action_mailer.smtp_settings = { address: ENV['SMTP_ADDRESS'] }
- config.action_mailer.smtp_settings[:port] = ENV['SMTP_PORT'] if ENV['SMTP_PORT'].present?
- config.action_mailer.smtp_settings[:domain] = ENV['SMTP_DOMAIN'] if ENV['SMTP_DOMAIN'].present?
- config.action_mailer.smtp_settings[:user_name] = ENV['SMTP_USER_NAME'] if ENV['SMTP_USER_NAME'].present?
- config.action_mailer.smtp_settings[:password] = ENV['SMTP_PASSWORD'] if ENV['SMTP_PASSWORD'].present?
- config.action_mailer.smtp_settings[:authentication] = ENV['SMTP_AUTHENTICATION'] if ENV['SMTP_AUTHENTICATION'].present?
- config.action_mailer.smtp_settings[:enable_starttls_auto] = ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true' if ENV['SMTP_ENABLE_STARTTLS_AUTO'].present?
- config.action_mailer.smtp_settings[:openssl_verify_mode] = ENV['SMTP_OPENSSL_VERIFY_MODE'] if ENV['SMTP_OPENSSL_VERIFY_MODE'].present?
- else
- # Use sendmail as default to avoid ssl cert problems
- config.action_mailer.delivery_method = :sendmail
- end
-
- # Use default logging formatter so that PID and timestamp are not suppressed.
- config.log_formatter = ::Logger::Formatter.new
-
- # Use a different logger for distributed setups.
- # require 'syslog/logger'
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
-
- if ENV["RAILS_LOG_TO_STDOUT"].present?
- logger = ActiveSupport::Logger.new(STDOUT)
- logger.formatter = config.log_formatter
- config.logger = ActiveSupport::TaggedLogging.new(logger)
- end
-
- # Do not dump schema after migrations.
- config.active_record.dump_schema_after_migration = false
-end
From 25d5ae520b22aef3b680aaaf4a4c48c77c9787e1 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Wed, 1 Dec 2021 18:49:11 +0100
Subject: [PATCH 12/16] feat: support additional domains
---
.env.sample | 1 +
compose.yml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.env.sample b/.env.sample
index e7d6f20..1a53680 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,6 +1,7 @@
TYPE=foodsoft
DOMAIN=order.example.org
+#EXTRA_DOMAINS=', `www.order.example.com`'
LETS_ENCRYPT_ENV=production
# app settings
diff --git a/compose.yml b/compose.yml
index b6a7f16..b5fb696 100644
--- a/compose.yml
+++ b/compose.yml
@@ -72,7 +72,7 @@ services:
order: start-first
labels:
- "traefik.enable=true"
- - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
+ - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
From 7ab041cc7e33cfbfe6b0ca3797912174a53c7247 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Thu, 23 Dec 2021 19:18:22 +0100
Subject: [PATCH 13/16] feat: config apple points
See https://github.com/foodcoops/foodsoft/issues/867.
---
.env.sample | 1 +
app_config.yml.tmpl | 2 +-
compose.yml | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.env.sample b/.env.sample
index 1a53680..9ef097e 100644
--- a/.env.sample
+++ b/.env.sample
@@ -17,6 +17,7 @@ FOODCOOP_HOMEPAGE=https://order.example.org
FOODCOOP_HELP_URL=https://order.example.org
FOODCOOP_TIME_ZONE=Amsterdam
FOODCOOP_FOOTER='example hosted by Your Tech Co-op.'
+USE_APPLE_POINTS=false
# database settings
MYSQL_DB=foodsoft
diff --git a/app_config.yml.tmpl b/app_config.yml.tmpl
index eb02e53..febd592 100644
--- a/app_config.yml.tmpl
+++ b/app_config.yml.tmpl
@@ -62,7 +62,7 @@ default: &defaults
#stop_ordering_under: 75
# Comment out to completely hide apple points (be sure to comment stop_ordering_under)
- #use_apple_points: false
+ 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
diff --git a/compose.yml b/compose.yml
index b5fb696..3c0eaa9 100644
--- a/compose.yml
+++ b/compose.yml
@@ -33,6 +33,7 @@ x-env: &env
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
SMTP_PORT:
SMTP_USER_NAME:
+ USE_APPLE_POINTS:
x-configs: &configs
- source: app_config
From 1875ea1c095453c94209096b10f7c4e943e8634d Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Thu, 23 Dec 2021 19:19:05 +0100
Subject: [PATCH 14/16] chore: bump vendored config
---
abra.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/abra.sh b/abra.sh
index 7007d7c..61c6aa2 100644
--- a/abra.sh
+++ b/abra.sh
@@ -1,4 +1,4 @@
-export APP_CONFIG_VERSION=v2
+export APP_CONFIG_VERSION=v3
export DB_CONFIG_VERSION=v1
export ENTRYPOINT_VERSION=v1
export PRODUCTION_ENV_VERSION=v1
From 7e7e8af313420d4b5235ad5e1bb96ef162cdbccd Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Thu, 23 Dec 2021 19:45:57 +0100
Subject: [PATCH 15/16] feat: support config for order limits
---
.env.sample | 2 ++
abra.sh | 2 +-
app_config.yml.tmpl | 4 ++--
compose.yml | 2 ++
4 files changed, 7 insertions(+), 3 deletions(-)
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
From a02f7f2f20e0e5a5881c6811e0e66066d5060e48 Mon Sep 17 00:00:00 2001
From: cellarspoon
Date: Sun, 26 Dec 2021 02:16:34 +0100
Subject: [PATCH 16/16] fix: use what catalogue generation expects
---
README.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 7207f20..bee0474 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,13 @@ New instances automatically set the initial administrator login to username: `ad
-- **Category**: Apps
-- **Status**:
-- **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
-- **Healthcheck**:
-- **Backups**:
-- **Email**:
-- **Tests**:
-- **SSO**:
+* **Category**: Apps
+* **Status**:
+* **Image**: [`foodcoops/foodsoft`](https://hub.docker.com/r/foodcoops/foodsoft), 4, upstream
+* **Healthcheck**:
+* **Backups**:
+* **Email**:
+* **Tests**:
+* **SSO**: