some improvements #6
241
compose.yml
241
compose.yml
@ -1,61 +1,60 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
x-env: &env
|
|
||||||
yksflip marked this conversation as resolved
Outdated
|
|||||||
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:
|
|
||||||
x-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
|
|
||||||
x-secrets: &secrets
|
|
||||||
- db_password
|
|
||||||
- secret_key_base
|
|
||||||
- smtp_password
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: foodcoops/foodsoft:4.7.1
|
image: foodcoops/foodsoft:4.7.1
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
- proxy
|
- proxy
|
||||||
secrets: *secrets
|
secrets:
|
||||||
configs: *configs
|
- db_password
|
||||||
entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
|
- 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
|
||||||
environment:
|
environment:
|
||||||
!%21merge <<: *env
|
CERTBOT_DISABLED: 1
|
||||||
|
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:
|
||||||
|
FOODCOOP_USE_NICK:
|
||||||
|
FOODCOOP_LANGUAGE:
|
||||||
|
LOG_LEVEL:
|
||||||
|
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
|
||||||
|
SMTP_ADDRESS:
|
||||||
|
SMTP_AUTHENTICATION:
|
||||||
|
SMTP_DOMAIN:
|
||||||
|
SMTP_ENABLE_STARTTLS_AUTO:
|
||||||
|
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
|
||||||
|
SMTP_PORT:
|
||||||
|
SMTP_USER_NAME:
|
||||||
FOODSOFT_SERVICE: app
|
FOODSOFT_SERVICE: app
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||||
@ -76,54 +75,122 @@ services:
|
|||||||
- coop-cloud.${STACK_NAME}.app.version=4.7.1-
|
- coop-cloud.${STACK_NAME}.app.version=4.7.1-
|
||||||
cron:
|
cron:
|
||||||
image: foodcoops/foodsoft:4.7.1
|
image: foodcoops/foodsoft:4.7.1
|
||||||
|
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
|
||||||
environment:
|
environment:
|
||||||
!%21merge <<: *env
|
CERTBOT_DISABLED: 1
|
||||||
|
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:
|
||||||
|
FOODCOOP_USE_NICK:
|
||||||
|
FOODCOOP_LANGUAGE:
|
||||||
|
LOG_LEVEL:
|
||||||
|
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
|
||||||
|
SMTP_ADDRESS:
|
||||||
|
SMTP_AUTHENTICATION:
|
||||||
|
SMTP_DOMAIN:
|
||||||
|
SMTP_ENABLE_STARTTLS_AUTO:
|
||||||
|
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
|
||||||
|
SMTP_PORT:
|
||||||
|
SMTP_USER_NAME:
|
||||||
FOODSOFT_SERVICE: cron
|
FOODSOFT_SERVICE: cron
|
||||||
configs: *configs
|
|
||||||
entrypoint: *entrypoint
|
|
||||||
secrets: *secrets
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
deploy:
|
|
||||||
labels: ['coop-cloud.${STACK_NAME}.cron.version=4.7.1-']
|
|
||||||
worker:
|
worker:
|
||||||
image: foodcoops/foodsoft:4.7.1
|
image: foodcoops/foodsoft:4.7.1
|
||||||
|
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
|
||||||
environment:
|
environment:
|
||||||
!%21merge <<: *env
|
CERTBOT_DISABLED: 1
|
||||||
|
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:
|
||||||
|
FOODCOOP_USE_NICK:
|
||||||
|
FOODCOOP_LANGUAGE:
|
||||||
|
LOG_LEVEL:
|
||||||
|
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
|
||||||
|
SMTP_ADDRESS:
|
||||||
|
SMTP_AUTHENTICATION:
|
||||||
|
SMTP_DOMAIN:
|
||||||
|
SMTP_ENABLE_STARTTLS_AUTO:
|
||||||
|
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
|
||||||
|
SMTP_PORT:
|
||||||
|
SMTP_USER_NAME:
|
||||||
FOODSOFT_SERVICE: worker
|
FOODSOFT_SERVICE: worker
|
||||||
configs: *configs
|
|
||||||
entrypoint: *entrypoint
|
|
||||||
secrets: *secrets
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
deploy:
|
|
||||||
labels: ['coop-cloud.${STACK_NAME}.worker.version=4.7.1-']
|
|
||||||
smtp:
|
|
||||||
image: foodcoops/foodsoft:4.7.1
|
|
||||||
configs: *configs
|
|
||||||
entrypoint: *entrypoint
|
|
||||||
secrets: *secrets
|
|
||||||
environment:
|
|
||||||
!%21merge <<: *env
|
|
||||||
FOODSOFT_SERVICE: smtp
|
|
||||||
SMTP_SERVER_HOST:
|
|
||||||
SMTP_SERVER_PORT:
|
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
- internal
|
|
||||||
deploy:
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "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:
|
db:
|
||||||
image: "mariadb:10.6"
|
image: "mariadb:10.6"
|
||||||
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci"
|
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_USER: foodsoft
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_DATABASE: foodsoft
|
MYSQL_DATABASE: ${MYSQL_DB}
|
||||||
MYSQL_PASSWORD_FILE: /run/secrets/db_password
|
MYSQL_PASSWORD_FILE: /run/secrets/db_password
|
||||||
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
|
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
|
||||||
secrets:
|
secrets:
|
||||||
@ -139,14 +206,15 @@ services:
|
|||||||
image: "redis:6"
|
image: "redis:6"
|
||||||
yksflip marked this conversation as resolved
Outdated
decentral1se
commented
👏 👏
|
|||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
deploy:
|
|
||||||
labels: ['coop-cloud.${STACK_NAME}.cache.version=6-']
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
app_config:
|
app_config:
|
||||||
name: ${STACK_NAME}_app_config_${APP_CONFIG_VERSION}
|
name: ${STACK_NAME}_app_config_${APP_CONFIG_VERSION}
|
||||||
@ -164,6 +232,7 @@ configs:
|
|||||||
name: ${STACK_NAME}_production_env_${PRODUCTION_ENV_VERSION}
|
name: ${STACK_NAME}_production_env_${PRODUCTION_ENV_VERSION}
|
||||||
file: production.rb.tmpl
|
file: production.rb.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
db_password:
|
db_password:
|
||||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||||
|
Loading…
Reference in New Issue
Block a user
Ah, wait a sec, I think
abra
can still deal with this it is just the weird!%21merge
characters which somehow snuck into the config. I thought I resolved that inc5c0768b10
&66b6992b0b
? Without this admittedly not very nice YAML feature, the duplication of config is really getting too much, no?okay, I'll give it another try :)
nice, my eyes feel releaved!
a simple git fetch could have saved me some pain :D