30 lines
817 B
Django/Jinja
30 lines
817 B
Django/Jinja
{# code: language=ansible-jinja #}
|
|
# THIS FILE IS MANAGED BY ANSIBLE
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: boky/postfix:{{ apps_vars.postfix.version }}
|
|
restart: always
|
|
environment:
|
|
ALLOWED_SENDER_DOMAINS: {{ apps_senders | join(' ') }}
|
|
HOSTNAME: {{ apps_vars.postfix.hostname }}
|
|
DKIM_AUTOGENERATE: true
|
|
networks:
|
|
{{ apps_postfix_docker_network }}:
|
|
aliases:
|
|
- postfix
|
|
volumes:
|
|
- "./data:/etc/opendkim/keys:rw"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "printf \"EHLO healthcheck\\nquit\\n\" | { while read l ; do sleep 1; echo $$l; done } | nc -w 2 127.0.0.1 587 | grep -qE \"^220.*ESMTP Postfix\""]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
networks:
|
|
{{ apps_postfix_docker_network }}:
|
|
external: true
|