compose-website/unit-files/dovecot.service
2015-03-29 15:09:13 +01:00

39 lines
895 B
Desktop File

[Unit]
Description=%p
# Requirements
Requires=docker.service
Requires=mysql@mail.service
Requires=backup@mail.timer
# Dependency ordering
After=docker.service
After=mysql@mail.service
Before=backup@mail.timer
[Service]
Restart=always
RestartSec=10
TimeoutStartSec=60
TimeoutStopSec=15
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/docker run --rm -v /opt/bin:/opt/bin ibuildthecloud/systemd-docker
ExecStartPre=-/usr/bin/docker kill dovecot
ExecStartPre=-/usr/bin/docker rm dovecot
ExecStart=/bin/bash -euxc ' \
/opt/bin/systemd-docker --env run \
--rm \
--name dovecot \
-v /data/domains/mail/TLS:/ssl \
-v /data/runtime/dev/log:/dev/log \
--env-file=/data/domains/mail/.env \
--link mysql-mail:db \
-p 993:993 \
indiepaas/dovecot'
ExecReload=/usr/bin/docker restart dovecot
ExecStop=/usr/bin/docker stop dovecot
[Install]
WantedBy=multi-user.target