# Adapted from https://github.com/maxking/docker-mailman/blob/2693386453ff3865b7c106c6aa456b683bd3bf08/docker-compose-mysql.yaml # which is an MIT licensed repo. version: '2' services: mailman-core: image: docker.io/opendevorg/mailman-core:latest restart: always container_name: mailman-core volumes: - /var/lib/mailman/core:/opt/mailman/ - /var/lib/mailman/import:/opt/import stop_grace_period: 30s depends_on: - database environment: - DATABASE_URL=mysql+pymysql://mailman:{{ mailman3_db_password }}@127.0.0.1:3306/mailmandb?charset=utf8mb4&use_unicode=1 - DATABASE_TYPE=mysql - DATABASE_CLASS=mailman.database.mysql.MySQLDatabase - HYPERKITTY_URL=http://127.0.0.1:8000/archives - HYPERKITTY_API_KEY={{ mailman3_hyperkitty_api_key }} - SMTP_HOST=localhost - MM_HOSTNAME=localhost - MAILMAN_REST_USER=restadmin - MAILMAN_REST_PASSWORD={{ mailman3_rest_password }} network_mode: host #user: mailman mailman-web: image: docker.io/opendevorg/mailman-web:latest restart: always container_name: mailman-web depends_on: - database volumes: - /var/lib/mailman/import:/opt/import - /var/lib/mailman/web-data:/opt/mailman-web-data - /var/lib/mailman/web/settings.py:/opt/mailman-web/settings.py environment: # Testing to see if these are really necessary #- MAILMAN_ADMIN_USER={{ mailman3_admin_user }} #- MAILMAN_ADMIN_EMAIL={{ mailman3_admin_email }} - SERVE_FROM_DOMAIN=lists.opendev.org - DJANGO_ALLOWED_HOSTS={{ mm_domains.split(':') | join(',') }} - DATABASE_TYPE=mysql - DATABASE_URL=mysql://mailman:{{ mailman3_db_password }}@127.0.0.1:3306/mailmandb?charset=utf8mb4 - HYPERKITTY_API_KEY={{ mailman3_hyperkitty_api_key }} - SECRET_KEY={{ mailman3_django_secret_key }} - DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ - MAILMAN_HOSTNAME=localhost - MAILMAN_REST_URL=http://127.0.0.1:8001 - MAILMAN_REST_USER=restadmin - MAILMAN_REST_PASSWORD={{ mailman3_rest_password }} - POSTORIUS_TEMPLATE_BASE_URL=http://127.0.0.1:8000 - SMTP_HOST=localhost network_mode: host #user: mailman database: environment: MYSQL_DATABASE: mailmandb MYSQL_USER: mailman MYSQL_PASSWORD: {{ mailman3_db_password }} MYSQL_ROOT_PASSWORD: {{ mailman3_db_root_password }} image: docker.io/library/mariadb:10.6 restart: always command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci volumes: - /var/lib/mailman/database:/var/lib/mysql - /var/lib/mailman/99-max_allowed_packet.cnf:/etc/mysql/conf.d/99-max_allowed_packet.cnf:ro network_mode: host