Split out shared lists functionality
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Luke Murphy 2020-11-08 15:05:37 +01:00
parent 962f2ed153
commit 8ebd8f89af
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 23 additions and 8 deletions

View File

@ -24,6 +24,8 @@ export EMAIL_SENDER=foodsoft@biobulkbende.org
export EMAIL_REPLY=foodsoft@biobulkbende.org
export ERROR_EMAIL=systems@biobulkbende.org
# export COMPOSE_FILE="compose.yml:compose.sharedlists.yml"
export ENABLE_SHARED_LISTS=0
export SHARED_LISTS_DB_TYPE=mysql2
export SHARED_LISTS_HOST=order.voedselcollectief.org
export SHARED_LISTS_DB_NAME=sharedlists

View File

@ -142,6 +142,8 @@ default: &defaults
host: "{{ env "DOMAIN" }}"
#port: 3000
{{ if eq (env "ENABLED_SHARED_LISTS") "1" }}
# Access to sharedlists, the external article-database.
# This allows a foodcoop to subscribe to a selection of a supplier's full assortment,
# and makes it possible to share data with several foodcoops. Using this requires installing
@ -152,6 +154,7 @@ default: &defaults
database: "{{ env "SHARED_LISTS_DB_NAME" }}"
username: "{{ env "SHARED_LISTS_USER" }}"
password: "{{ secret "shared_lists_db_password" }}"
{{ end }}
# don't remove this, required to run the app
production:

18
compose.sharedlists.yml Normal file
View File

@ -0,0 +1,18 @@
---
version: "3.8"
services:
app:
secrets:
- shared_lists_db_password
environment:
- ENABLED_SHARED_LISTS
- SHARED_LISTS_DB_NAME
- SHARED_LISTS_DB_TYPE
- SHARED_LISTS_HOST
- SHARED_LISTS_USER
secrets:
shared_lists_db_password:
name: ${STACK_NAME}_shared_lists_db_password_${SECRET_SHARED_LISTS_DB_PASSWORD_VERSION}
external: true

View File

@ -10,7 +10,6 @@ services:
secrets:
- db_password
- secret_key_base
- shared_lists_db_password
- smtp_password
configs:
- source: app_config
@ -44,10 +43,6 @@ services:
- QUEUE=foodsoft_notifier
- REDIS_URL=redis://cache:6379
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
- SHARED_LISTS_DB_NAME
- SHARED_LISTS_DB_TYPE
- SHARED_LISTS_HOST
- SHARED_LISTS_USER
- SMTP_ADDRESS
- SMTP_DOMAIN
- SMTP_PASSWORD_FILE=/run/secrets/smtp_password
@ -142,9 +137,6 @@ secrets:
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true
shared_lists_db_password:
name: ${STACK_NAME}_shared_lists_db_password_${SECRET_SHARED_LISTS_DB_PASSWORD_VERSION}
external: true
smtp_password:
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
external: true