2014-10-17 13:41:23 +00:00
|
|
|
[Unit]
|
|
|
|
Description=%p
|
2014-10-27 12:32:21 +00:00
|
|
|
|
|
|
|
# Requirements
|
2014-10-17 13:41:23 +00:00
|
|
|
Requires=docker.service
|
2015-03-05 17:30:46 +00:00
|
|
|
Requires=dovecot.service
|
2014-10-17 13:41:23 +00:00
|
|
|
|
2014-10-27 12:32:21 +00:00
|
|
|
# Dependency ordering
|
|
|
|
After=docker.service
|
2015-02-16 16:33:03 +00:00
|
|
|
After=rsyslog.service
|
2015-03-05 17:30:46 +00:00
|
|
|
After=dovecot.service
|
2014-10-27 12:32:21 +00:00
|
|
|
|
2014-10-17 13:41:23 +00:00
|
|
|
[Service]
|
|
|
|
Restart=always
|
2015-01-15 16:37:11 +00:00
|
|
|
RestartSec=20
|
2015-01-16 10:01:44 +00:00
|
|
|
TimeoutStartSec=0
|
2014-10-17 13:41:23 +00:00
|
|
|
ExecStartPre=-/usr/bin/docker kill %p
|
|
|
|
ExecStartPre=-/usr/bin/docker rm %p
|
2014-10-27 12:32:21 +00:00
|
|
|
ExecStart=/usr/bin/docker run \
|
2015-01-14 13:48:24 +00:00
|
|
|
--rm \
|
2014-10-27 12:32:21 +00:00
|
|
|
--name %p \
|
2015-03-05 17:30:46 +00:00
|
|
|
--env-file=/data/domains/mail/.env \
|
2015-02-16 16:33:03 +00:00
|
|
|
-v /data/runtime/dev/log:/dev/log \
|
2015-03-05 17:30:46 +00:00
|
|
|
-v /data/runtime/postfix:/data \
|
|
|
|
-v /data/runtime/mail:/var/mail \
|
|
|
|
-v /data/domains/mail/TLS:/ssl \
|
2015-04-03 08:40:42 +00:00
|
|
|
-v /data/domains/mail/opendkim:/etc/opendkim \
|
2015-03-05 17:30:46 +00:00
|
|
|
--volumes-from=dovecot \
|
2014-10-27 12:32:21 +00:00
|
|
|
-p 25:25 \
|
2015-03-05 17:30:46 +00:00
|
|
|
-p 587:587 \
|
|
|
|
-link=mysql-mail:db \
|
2015-03-29 14:09:13 +00:00
|
|
|
indiepaas/postfix
|
2014-10-17 13:41:23 +00:00
|
|
|
ExecReload=/usr/bin/docker restart %p
|
|
|
|
ExecStop=/usr/bin/docker stop %p
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2015-01-15 16:35:51 +00:00
|
|
|
|