From 9e686078be4e6844136b83a074873556bc0f8568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Thu, 21 Mar 2019 09:41:45 +0100 Subject: [PATCH] Some mailman stuff. --- roles/docker/tasks/services/mailman.yml | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 roles/docker/tasks/services/mailman.yml diff --git a/roles/docker/tasks/services/mailman.yml b/roles/docker/tasks/services/mailman.yml new file mode 100644 index 0000000..131d295 --- /dev/null +++ b/roles/docker/tasks/services/mailman.yml @@ -0,0 +1,68 @@ +--- + +- name: run mailman server containers + docker_service: + definition: + version: '2' + + services: + mailman-core: + image: maxking/mailman-core:0.2 + container_name: mailman-core + hostname: mailman-core + volumes: + - /opt/mailman/core:/opt/mailman/ + stop_grace_period: 30s + links: + - database:database + depends_on: + - database + environment: + - DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb + - DATABASE_TYPE=postgres + - DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase + - HYPERKITTY_API_KEY={{ hyperkitty_api_key }} + networks: + mailman: + ipv4_address: 172.19.199.2 + + mailman-web: + image: maxking/mailman-web:0.2 + container_name: mailman-web + hostname: mailman-web + depends_on: + - database + links: + - mailman-core:mailman-core + - database:database + volumes: + - /opt/mailman/web:/opt/mailman-web-data + environment: + - DATABASE_TYPE=postgres + - DATABASE_URL=postgres://mailman:{{ postgresql}}@database/mailmandb + - HYPERKITTY_API_KEY={{ hyperkitty_api_key }} + networks: + mailman: + ipv4_address: 172.19.199.3 + + database: + environment: + POSTGRES_DB: mailmandb + POSTGRES_USER: mailman + POSTGRES_PASSWORD: mailmanpass + restart: always + image: postgres:9.6-alpine + volumes: + - /opt/mailman/database:/var/lib/postgresql/data + networks: + mailman: + ipv4_address: 172.19.199.4 + + networks: + mailman: + driver: bridge + ipam: + driver: default + config: + - + subnet: 172.19.199.0/24