Use anchors and MKLIs to share config
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
f78421dcf0
commit
f8a324c49c
170
compose.yml
170
compose.yml
|
@ -1,60 +1,67 @@
|
|||
---
|
||||
version: "3.8"
|
||||
|
||||
env: &env
|
||||
- DOMAIN
|
||||
- EMAIL_ERROR
|
||||
- EMAIL_REPLY_DOMAIN
|
||||
- EMAIL_SENDER
|
||||
- FOODCOOP_CITY
|
||||
- FOODCOOP_COUNTRY
|
||||
- FOODCOOP_EMAIL
|
||||
- FOODCOOP_FOOTER
|
||||
- FOODCOOP_HELP_URL
|
||||
- FOODCOOP_HOMEPAGE
|
||||
- FOODCOOP_MULTI_INSTALL
|
||||
- FOODCOOP_NAME
|
||||
- FOODCOOP_PHONE
|
||||
- FOODCOOP_STREET
|
||||
- FOODCOOP_TIME_ZONE
|
||||
- FOODCOOP_ZIP_CODE
|
||||
- LOG_LEVEL
|
||||
- MYSQL_DB=foodsoft
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_USER=foodsoft
|
||||
- QUEUE=foodsoft_notifier
|
||||
- REDIS_URL=redis://cache:6379
|
||||
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
|
||||
- SMTP_ADDRESS
|
||||
- SMTP_AUTHENTICATION
|
||||
- SMTP_DOMAIN
|
||||
- SMTP_ENABLE_STARTTLS_AUTO
|
||||
- SMTP_PASSWORD_FILE=/run/secrets/smtp_password
|
||||
- SMTP_PORT
|
||||
- SMTP_USER_NAME
|
||||
|
||||
configs: &configs
|
||||
- source: app_config
|
||||
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
|
||||
|
||||
secrets: &secrets
|
||||
- db_password
|
||||
- secret_key_base
|
||||
- smtp_password
|
||||
|
||||
services:
|
||||
app:
|
||||
image: "foodcoops/foodsoft:4.7.1"
|
||||
image: &image foodcoops/foodsoft:4.7.1
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
secrets:
|
||||
- db_password
|
||||
- secret_key_base
|
||||
- smtp_password
|
||||
configs:
|
||||
- source: app_config
|
||||
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
|
||||
entrypoint: /usr/src/app/docker-entrypoint.sh
|
||||
secrets: *secrets
|
||||
configs: *configs
|
||||
entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
|
||||
environment:
|
||||
- DOMAIN
|
||||
- EMAIL_ERROR
|
||||
- EMAIL_REPLY_DOMAIN
|
||||
- EMAIL_SENDER
|
||||
- FOODCOOP_CITY
|
||||
- FOODCOOP_COUNTRY
|
||||
- FOODCOOP_EMAIL
|
||||
- FOODCOOP_FOOTER
|
||||
- FOODCOOP_HELP_URL
|
||||
- FOODCOOP_HOMEPAGE
|
||||
- FOODCOOP_MULTI_INSTALL
|
||||
- FOODCOOP_NAME
|
||||
- FOODCOOP_PHONE
|
||||
- FOODCOOP_STREET
|
||||
- FOODCOOP_TIME_ZONE
|
||||
- FOODCOOP_ZIP_CODE
|
||||
<<: *env
|
||||
- FOODSOFT_SERVICE=app
|
||||
- LOG_LEVEL
|
||||
- MYSQL_DB=foodsoft
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_USER=foodsoft
|
||||
- QUEUE=foodsoft_notifier
|
||||
- REDIS_URL=redis://cache:6379
|
||||
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
|
||||
- SMTP_ADDRESS
|
||||
- SMTP_AUTHENTICATION
|
||||
- SMTP_DOMAIN
|
||||
- SMTP_ENABLE_STARTTLS_AUTO
|
||||
- SMTP_PASSWORD_FILE=/run/secrets/smtp_password
|
||||
- SMTP_PORT
|
||||
- SMTP_USER_NAME
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||
interval: 15s
|
||||
|
@ -73,50 +80,23 @@ services:
|
|||
- "traefik.http.routers.foodsoft.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
|
||||
cron:
|
||||
image: "foodcoops/foodsoft:4.7.1"
|
||||
image: *image
|
||||
environment:
|
||||
<<: *env
|
||||
- FOODSOFT_SERVICE=cron
|
||||
- LOG_LEVEL
|
||||
- MYSQL_DB
|
||||
- MYSQL_HOST
|
||||
- MYSQL_PORT
|
||||
- MYSQL_USER
|
||||
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
|
||||
configs:
|
||||
- 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
|
||||
entrypoint: /usr/src/app/docker-entrypoint.sh
|
||||
secrets:
|
||||
- db_password
|
||||
- secret_key_base
|
||||
configs: *configs
|
||||
entrypoint: *entrypoint
|
||||
secrets: *secrets
|
||||
networks:
|
||||
- internal
|
||||
|
||||
worker:
|
||||
image: "foodcoops/foodsoft:4.7.1"
|
||||
image: *image
|
||||
environment:
|
||||
<<: *env
|
||||
- FOODSOFT_SERVICE=worker
|
||||
- LOG_LEVEL
|
||||
- MYSQL_DB
|
||||
- MYSQL_HOST
|
||||
- MYSQL_PORT
|
||||
- MYSQL_USER
|
||||
- REDIS_URL=redis://cache:6379
|
||||
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
|
||||
configs:
|
||||
- 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
|
||||
entrypoint: /usr/src/app/docker-entrypoint.sh
|
||||
configs: *configs
|
||||
entrypoint: *entrypoint
|
||||
secrets:
|
||||
- db_password
|
||||
- secret_key_base
|
||||
|
@ -124,27 +104,13 @@ services:
|
|||
- internal
|
||||
|
||||
smtp:
|
||||
image: "foodcoops/foodsoft:4.7.1"
|
||||
configs:
|
||||
- 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
|
||||
entrypoint: /usr/src/app/docker-entrypoint.sh
|
||||
secrets:
|
||||
- db_password
|
||||
- secret_key_base
|
||||
image: *image
|
||||
configs: *configs
|
||||
entrypoint: *entrypoint
|
||||
secrets: *secrets
|
||||
environment:
|
||||
<<: *env
|
||||
- FOODSOFT_SERVICE=smtp
|
||||
- LOG_LEVEL
|
||||
- MYSQL_DB
|
||||
- MYSQL_HOST
|
||||
- MYSQL_PORT
|
||||
- MYSQL_USER
|
||||
- SECRET_KEY_BASE_FILE=/run/secrets/secret_key_base
|
||||
- SMTP_SERVER_HOST
|
||||
- SMTP_SERVER_PORT
|
||||
networks:
|
||||
|
|
Reference in New Issue