data.coop-ansible/roles/docker/tasks/services/mailman.yml

69 lines
1.9 KiB
YAML
Raw Permalink Normal View History

2019-03-21 08:41:45 +00:00
---
- 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