[Unit] Description=%p # Requirements Requires=docker.service Requires=dovecot.service # Dependency ordering After=docker.service After=rsyslog.service After=dovecot.service [Service] Restart=always RestartSec=20 TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill %p ExecStartPre=-/usr/bin/docker rm %p ExecStart=/usr/bin/docker run \ --rm \ --name %p \ --env-file=/data/domains/mail/.env \ -v /data/runtime/dev/log:/dev/log \ -v /data/runtime/postfix:/data \ -v /data/runtime/mail:/var/mail \ -v /data/domains/mail/TLS:/ssl \ -v /data/domains/mail/opendkim:/etc/opendkim \ --volumes-from=dovecot \ -p 25:25 \ -p 587:587 \ --link=mysql-mail:db \ indiepaas/postfix ExecReload=/usr/bin/docker restart %p ExecStop=/usr/bin/docker stop %p [Install] WantedBy=multi-user.target