Merge pull request 'some improvements' (#6) from make_foodsoft_work_again into main
continuous-integration/drone/push Build is failing Details

Reviewed-on: #6
This commit is contained in:
decentral1se 2022-04-12 10:37:21 +00:00
commit 3439069337
5 changed files with 45 additions and 19 deletions

View File

@ -3,6 +3,7 @@ TYPE=foodsoft
DOMAIN=order.example.org
#EXTRA_DOMAINS=', `www.order.example.com`'
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
# app settings
FOODCOOP_MULTI_INSTALL=true # Best for now, see https://github.com/foodcoops/foodsoft/pull/841
@ -16,6 +17,8 @@ FOODCOOP_ZIP_CODE=XXX
FOODCOOP_HOMEPAGE=https://order.example.org
FOODCOOP_HELP_URL=https://order.example.org
FOODCOOP_TIME_ZONE=Amsterdam
FOODCOOP_USE_NICK=true
FOODCOOP_LANGUAGE=en
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
@ -28,13 +31,17 @@ MYSQL_PORT=3306
MYSQL_USER=foodsoft
# shared supplier list settings
# COMPOSE_FILE="compose.yml:compose.sharedlists.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.sharedlists.yml"
# ENABLE_SHARED_LISTS=0
# SHARED_LISTS_DB_TYPE=mysql2
# SHARED_LISTS_HOST=order.otherfoodcoop.org
# SHARED_LISTS_DB_NAME=sharedlists
# SHARED_LISTS_USER=example
# Group order invoices generation pull request
# https://github.com/foodcoops/foodsoft/pull/907
# COMPOSE_FILE="$COMPOSE_FILE:compose.groupOrderInvoice.yml"
# outgoing mail settings
EMAIL_SENDER=noreply@example.org
EMAIL_ERROR=systems@example.org

View File

@ -1,4 +1,4 @@
export APP_CONFIG_VERSION=v4
export APP_CONFIG_VERSION=v5
export DB_CONFIG_VERSION=v1
export ENTRYPOINT_VERSION=v1
export PRODUCTION_ENV_VERSION=v1

View File

@ -33,7 +33,7 @@ default: &defaults
foodsoft_url: https://foodcoops.github.io
# Default language
default_locale: en
default_locale: {{ env "FOODCOOP_LANGUAGE" }}
# By default, foodsoft takes the language from the webbrowser/operating system.
# In case you really want foodsoft in a certain language by default, set this to true.
@ -86,7 +86,7 @@ default: &defaults
# When use_nick is enabled, there will be a nickname field in the user form,
# and the option to show a nickname instead of full name to foodcoop members.
# Members of a user's groups and administrators can still see full names.
use_nick: true
use_nick: {{ env "FOODCOOP_USE_NICK" }}
# Most plugins can be enabled/disabled here as well. Messages and wiki are enabled
# by default and need to be set to false to disable. Most other plugins needs to
@ -129,7 +129,7 @@ default: &defaults
email_from: "{{ env "EMAIL_SENDER" }}"
# domain to be used for reply emails
reply_email_domain: "{{ env "EMAIL_REPLY_DOMAIN" }}"
reply_email_domain: {{ env "EMAIL_REPLY_DOMAIN" }}
# If your foodcoop uses a mailing list instead of internal messaging system
#mailing_list: list@example.org

View File

@ -0,0 +1,12 @@
---
version: "3.8"
services:
app:
image: viehlieb/foodsoft:2022-04-07_2
cron:
image: viehlieb/foodsoft:2022-04-07_2
worker:
image: viehlieb/foodsoft:2022-04-07_2
smtp:
image: viehlieb/foodsoft:2022-04-07_2

View File

@ -2,6 +2,7 @@
version: "3.8"
x-env: &env
CERTBOT_DISABLED: 1
DOMAIN:
EMAIL_ERROR:
EMAIL_REPLY_DOMAIN:
@ -18,12 +19,13 @@ x-env: &env
FOODCOOP_STREET:
FOODCOOP_TIME_ZONE:
FOODCOOP_ZIP_CODE:
FOODCOOP_USE_NICK:
FOODCOOP_LANGUAGE:
LOG_LEVEL:
MINIMUM_BALANCE:
MYSQL_DB: foodsoft
MYSQL_HOST: db
MYSQL_PORT: 3306
MYSQL_USER: foodsoft
MYSQL_DB:
MYSQL_HOST:
MYSQL_PORT:
MYSQL_USER:
QUEUE: foodsoft_notifier
REDIS_URL: redis://cache:6379
SECRET_KEY_BASE_FILE: /run/secrets/secret_key_base
@ -83,23 +85,23 @@ services:
cron:
image: foodcoops/foodsoft:4.7.1
secrets: *secrets
configs: *configs
entrypoint: *entrypoint
environment:
<<: *env
FOODSOFT_SERVICE: cron
configs: *configs
entrypoint: *entrypoint
secrets: *secrets
networks:
- internal
worker:
image: foodcoops/foodsoft:4.7.1
secrets: *secrets
configs: *configs
entrypoint: *entrypoint
environment:
<<: *env
FOODSOFT_SERVICE: worker
configs: *configs
entrypoint: *entrypoint
secrets: *secrets
networks:
- internal
@ -127,8 +129,8 @@ services:
image: "mariadb:10.6"
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci"
environment:
MYSQL_USER: foodsoft
MYSQL_DATABASE: foodsoft
MYSQL_USER: ${MYSQL_USER}
MYSQL_DATABASE: ${MYSQL_DB}
MYSQL_PASSWORD_FILE: /run/secrets/db_password
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
secrets:
@ -138,7 +140,12 @@ services:
- "db:/var/lib/mysql"
networks:
- internal
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: 'mkdir -p /tmp/backup/ && mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" $${MYSQL_DATABASE} > /tmp/backup/backup.sql'
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
cache:
image: "redis:6"
networks: