Files
relay/docker-compose.yaml
j4n 0edff3205f docker: remove dead utilities, fix cmdeploy run using wrong config path
Remove no longer needed docker/files/update_ini.sh and docker/cm_ini_to_env.py.
Fix cmdeploy run not receiving --config.
Document env files
2026-02-18 17:05:28 +01:00

47 lines
1.5 KiB
YAML

# Copy docker/example.env to .env and set MAIL_DOMAIN before starting.
services:
chatmail:
build:
context: ./
dockerfile: docker/chatmail_relay.dockerfile
image: chatmail-relay:latest
restart: unless-stopped
container_name: chatmail
# Required for systemd — use only one of the following:
cgroup: host # compose v2 only
# privileged: true # compose v1 (not tested)
tty: true # required for logs
tmpfs: # required for systemd
- /tmp
- /run
- /run/lock
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
environment:
MAIL_DOMAIN: $MAIL_DOMAIN
CMDEPLOY_STAGES: ${CMDEPLOY_STAGES:-}
# Certificate monitoring (only needed with USE_FOREIGN_CERT_MANAGER)
USE_FOREIGN_CERT_MANAGER: ${USE_FOREIGN_CERT_MANAGER:-}
ENABLE_CERTS_MONITORING: ${ENABLE_CERTS_MONITORING:-}
CERTS_MONITORING_TIMEOUT: ${CERTS_MONITORING_TIMEOUT:-}
network_mode: "host"
volumes:
## system
- /sys/fs/cgroup:/sys/fs/cgroup:rw # required for systemd
## data
- ./data/chatmail:/home
- ./data/chatmail-dkimkeys:/etc/dkimkeys
- ./data/chatmail-acme:/var/lib/acme
## optional overrides
# - ./chatmail.ini:/etc/chatmail/chatmail.ini # use your own config
# - ./custom/www:/opt/chatmail-www # custom website
## debug
# - ./docker/files/setup_chatmail_docker.sh:/setup_chatmail_docker.sh
# - ./docker/files/entrypoint.sh:/entrypoint.sh