listmonk/docker-compose.yml
Easton Man 1819480153
docs: suggest an FQDN in docker compose file (#2019)
The 'hostname' field in the docker-compose file is later used in Listmonk to generate the 'Message-Id' of each mail. The hostname is used as the id-right section of 'Message-Id'.

According to RFC 2822 3.6.4, id-right = dot-atom-text / no-fold-literal / obs-id-right 
Also, Rspamd has a spam filtering field 'MID_RHS_NOT_FQDN' which defaults to a 1.0 score.

This commit suggests an FQDN in the docker-compose file, which is guaranteed to meet the requirement.
2024-08-27 22:11:49 +05:30

67 lines
1.5 KiB
YAML

# NOTE: This docker-compose.yml is meant to be just an example guideline
# on how you can achieve the same. It is not intented to run out of the box
# and you must edit the below configurations to suit your needs.
version: "3.7"
x-app-defaults: &app-defaults
restart: unless-stopped
image: listmonk/listmonk:latest
ports:
- "9000:9000"
networks:
- listmonk
environment:
- TZ=Etc/UTC
x-db-defaults: &db-defaults
image: postgres:13-alpine
ports:
- "9432:5432"
networks:
- listmonk
environment:
- POSTGRES_PASSWORD=listmonk
- POSTGRES_USER=listmonk
- POSTGRES_DB=listmonk
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U listmonk"]
interval: 10s
timeout: 5s
retries: 6
services:
db:
<<: *db-defaults
container_name: listmonk_db
volumes:
- type: volume
source: listmonk-data
target: /var/lib/postgresql/data
app:
<<: *app-defaults
container_name: listmonk_app
hostname: listmonk.example.com # Recommend using FQDN for hostname
depends_on:
- db
volumes:
- ./config.toml:/listmonk/config.toml
demo-db:
container_name: listmonk_demo_db
<<: *db-defaults
demo-app:
<<: *app-defaults
container_name: listmonk_demo_app
command: [sh, -c, "yes | ./listmonk --install --config config-demo.toml && ./listmonk --config config-demo.toml"]
depends_on:
- demo-db
networks:
listmonk:
volumes:
listmonk-data: