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"
|
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:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "foodcoops/foodsoft:4.7.1"
|
image: &image foodcoops/foodsoft:4.7.1
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
- proxy
|
- proxy
|
||||||
secrets:
|
secrets: *secrets
|
||||||
- db_password
|
configs: *configs
|
||||||
- secret_key_base
|
entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
|
||||||
- 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
|
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN
|
<<: *env
|
||||||
- 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
|
|
||||||
- FOODSOFT_SERVICE=app
|
- 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:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
|
@ -73,50 +80,23 @@ services:
|
||||||
- "traefik.http.routers.foodsoft.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.foodsoft.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: "foodcoops/foodsoft:4.7.1"
|
image: *image
|
||||||
environment:
|
environment:
|
||||||
|
<<: *env
|
||||||
- FOODSOFT_SERVICE=cron
|
- FOODSOFT_SERVICE=cron
|
||||||
- LOG_LEVEL
|
configs: *configs
|
||||||
- MYSQL_DB
|
entrypoint: *entrypoint
|
||||||
- MYSQL_HOST
|
secrets: *secrets
|
||||||
- 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
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: "foodcoops/foodsoft:4.7.1"
|
image: *image
|
||||||
environment:
|
environment:
|
||||||
|
<<: *env
|
||||||
- FOODSOFT_SERVICE=worker
|
- FOODSOFT_SERVICE=worker
|
||||||
- LOG_LEVEL
|
configs: *configs
|
||||||
- MYSQL_DB
|
entrypoint: *entrypoint
|
||||||
- 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
|
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- secret_key_base
|
- secret_key_base
|
||||||
|
@ -124,27 +104,13 @@ services:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
image: "foodcoops/foodsoft:4.7.1"
|
image: *image
|
||||||
configs:
|
configs: *configs
|
||||||
- source: db_config
|
entrypoint: *entrypoint
|
||||||
target: /usr/src/app/config/database.yml
|
secrets: *secrets
|
||||||
- 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
|
|
||||||
environment:
|
environment:
|
||||||
|
<<: *env
|
||||||
- FOODSOFT_SERVICE=smtp
|
- 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_HOST
|
||||||
- SMTP_SERVER_PORT
|
- SMTP_SERVER_PORT
|
||||||
networks:
|
networks:
|
||||||
|
|
Reference in New Issue