mirror of
https://github.com/chatmail/relay.git
synced 2026-05-13 09:24:43 +00:00
Remove update_ini.sh and the env-var-to-ini pipeline. The container now has two config modes: - Simple: set MAIL_DOMAIN in .env, container generates chatmail.ini with defaults via `cmdeploy init` on first start. - Advanced: mount a custom chatmail.ini into the container; the init step is skipped when the file already exists. This eliminates the fragile FORCE_REINIT_INI_FILE / INI_CMD_ARGS machinery and the env vars that duplicated chatmail.ini settings Also add *.ini and .env to .dockerignore so local config files don't leak into the image.
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
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
|