Example: Mailman
Table of contents
docker-compose
Given the following docker-compose:
# from https://github.com/maxking/docker-mailman/blob/9d9a627f72f3fcaa29f15f0ddfe0f77c686189ca/docker-compose-postorius.yaml
services:
mailman-core:
image: maxking/mailman-core:0.4
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
ports:
- "127.0.0.1:8001:8001" # API
- "127.0.0.1:8024:8024" # LMTP - incoming emails
networks:
mailman:
mailman-web:
image: maxking/postorius:0.4
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:mailmanpass@database/mailmandb
- SECRET_KEY=ksjdbaksdba
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
ports:
- "127.0.0.1:8000:8000" # HTTP
- "127.0.0.1:8080:8080" # uwsgi
networks:
mailman:
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:
networks:
mailman:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.19.199.0/24
Output (markdown)
Using the default output, the following mermaid diagram is generated:
%%{init: {'theme': 'default'}}%%
flowchart TB
Voptmailmancore{{/opt/mailman/core}} x-. /opt/mailman/ .-x mailmancore[mailman-core]
Voptmailmanweb{{/opt/mailman/web}} x-. /opt/mailman-web-data .-x mailmanweb[mailman-web]
Voptmailmandatabase{{/opt/mailman/database}} x-. /var/lib/postgresql/data .-x database[(database)]
mailmancore -- database --> database
mailmancore --> database
mailmanweb -- mailman-core --> mailmancore
mailmanweb -- database --> database
mailmanweb --> database
P0((8001)) -.-> mailmancore
P1((8024)) -.-> mailmancore
P2((8000)) -.-> mailmanweb
P3((8080)) -.-> mailmanweb
mailmancore -.- mailman[/mailman/]
mailmanweb -.- mailman
database -.- mailman
classDef volumes fill:#fdfae4,stroke:#867a22
class Voptmailmancore,Voptmailmanweb,Voptmailmandatabase volumes
classDef ports fill:#f8f8f8,stroke:#ccc
class P0,P1,P2,P3 ports
classDef nets fill:#fbfff7,stroke:#8bc34a
class mailman nets
Images (svg)
Using default theme (--with-bg
option):
Or dark theme (--with-bg
option):