mailman3/compose.yml

160 lines
4.3 KiB
YAML
Raw Normal View History

2020-11-07 13:22:17 +00:00
---
version: "3.8"
services:
core:
image: "maxking/mailman-core:0.3"
2020-11-10 12:05:22 +00:00
hostname: mailman-core
2020-11-07 13:22:17 +00:00
volumes:
- "core:/opt/mailman/"
networks:
- internal
2020-11-10 12:05:22 +00:00
secrets:
- db_password
- hyperkitty_api_key
- mailman_rest_password
2020-11-07 13:22:17 +00:00
environment:
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
2020-11-10 12:05:22 +00:00
- DATABASE_D
2020-11-07 13:22:17 +00:00
- DATABASE_DB=mailman
2020-11-10 12:05:22 +00:00
- DATABASE_HOST=db
2020-11-07 13:22:17 +00:00
- DATABASE_NAME=mailman
2020-11-10 12:05:22 +00:00
- DATABASE_PASSWORD_FILE=/run/secrets/db_password
2020-11-07 13:22:17 +00:00
- DATABASE_TYPE=postgres
- DATABASE_USER=mailman
2020-11-10 12:05:22 +00:00
- HYPERKITTY_API_KEY_FILE=/run/secrets/hyperkitty_api_key
- MAILMAN_REST_PASSWORD_FILE=/run/secrets/mailman_rest_password
- MAILMAN_REST_USER=restadmin
- MTA
- SMTP_HOST
- SMTP_PORT
configs:
- source: core_entrypoint_sh
target: /usr/local/bin/docker-entrypoint-custom.sh
mode: 0555
entrypoint: /usr/local/bin/docker-entrypoint-custom.sh
2020-11-07 13:22:17 +00:00
mail:
image: "mailu/postfix:1.7"
networks:
- internal
volumes:
2021-05-08 19:58:01 +00:00
- "mqueue:/queue"
healthcheck:
disable: true
front:
2020-11-07 13:22:17 +00:00
image: "maxking/mailman-web:0.3"
2020-11-10 12:05:22 +00:00
hostname: mailman-web
networks:
- internal
2020-11-07 13:22:17 +00:00
volumes:
- "web:/opt/mailman-web-data"
2020-11-10 12:05:22 +00:00
secrets:
- db_password
- django_secret_key
- hyperkitty_api_key
- smtp_host_password
2020-11-07 13:22:17 +00:00
environment:
2020-11-10 12:05:22 +00:00
- DATABASE_PASSWORD_FILE=/run/secrets/db_password
2020-11-07 13:22:17 +00:00
- DATABASE_TYPE=postgres
2020-11-10 12:05:22 +00:00
- HYPERKITTY_API_KEY_FILE=/run/secrets/hyperkitty_api_key
- MAILMAN_ADMIN_EMAIL
- MAILMAN_ADMIN_USER
- SECRET_KEY_FILE=/run/secrets/django_secret_key
- SERVE_FROM_DOMAIN
- SMTP_HOST
- SMTP_HOST_PASSWORD_FILE=/run/secrets/smtp_host_password
- SMTP_HOST_USER
- SMTP_PORT
- SMTP_USE_TLS
configs:
- source: web_entrypoint_sh
target: /usr/local/bin/docker-entrypoint-ustom.sh
mode: 0555
entrypoint: /usr/local/bin/docker-entrypoint-custom.sh
2020-11-07 13:22:17 +00:00
web:
image: "nginx:1.20.0"
environment:
- DOMAIN
- STACK_NAME
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
networks:
- proxy
- internal
deploy:
update_config:
failure_action: rollback
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
2020-11-10 12:48:25 +00:00
2020-11-07 13:22:17 +00:00
db:
image: "postgres:13-alpine"
secrets:
- db_password
networks:
- internal
2020-11-07 13:22:17 +00:00
environment:
POSTGRES_DB: mailman
POSTGRES_USER: mailman
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
volumes:
- "db:/var/lib/postgresql/data"
networks:
internal:
proxy:
external: true
2020-11-07 13:22:17 +00:00
volumes:
core:
db:
2021-05-08 19:58:01 +00:00
mqueue:
web:
2020-11-07 13:22:17 +00:00
secrets:
db_password:
external: true
2020-11-10 12:05:22 +00:00
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
hyperkitty_api_key:
external: true
name: ${STACK_NAME}_hyperkitty_api_key_${SECRET_HYPERKITTY_API_KEY_VERSION}
django_secret_key:
external: true
name: ${STACK_NAME}_django_secret_key_${SECRET_DJANGO_SECRET_KEY_VERSION}
mailman_rest_password:
external: true
2021-05-08 20:29:15 +00:00
name: ${STACK_NAME}_mailman_rest_password_${SECRET_MAILMAN_REST_PASSWORD_VERSION}
2020-11-10 12:05:22 +00:00
smtp_host_password:
external: true
name: ${STACK_NAME}_smtp_host_password_${SECRET_SMTP_HOST_PASSWORD_VERSION}
2020-11-07 13:22:17 +00:00
configs:
2020-11-10 12:05:22 +00:00
core_entrypoint_sh:
name: ${STACK_NAME}_core_entrypoint_conf_${CORE_ENTRYPOINT_CONF_VERSION}
file: entrypoint.core.sh.tmpl
template_driver: golang
web_entrypoint_sh:
name: ${STACK_NAME}_web_entrypoint_conf_${WEB_ENTRYPOINT_CONF_VERSION}
file: entrypoint.web.sh.tmpl
2020-11-07 13:22:17 +00:00
template_driver: golang
nginx_conf:
name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION}
file: nginx.conf.tmpl
template_driver: golang
settings_local:
name: ${STACK_NAME}_settings_local_${SETTINGS_LOCAL_VERSION}
file: settings_local.py.tmpl
template_driver: golang
2021-05-08 20:29:15 +00:00
mailman_extra_cfg:
name: ${STACK_NAME}_mailman_extra_cfg_${MAILMAN_EXTRA_CFG_VERSION}
file: mailman-extra.cfg.tmpl
template_driver: golang