coreos-home-server/config/service/dovecot/systemd/dovecot.service

21 lines
1.2 KiB
SYSTEMD
Raw Normal View History

[Unit]
Description=Dovecot POP3/IMAP server
Wants=container-build@%N.service container-network@mail.service container-network@internal.service mariadb.service rspamd.service
After=container-build@%N.service container-network@mail.service container-network@internal.service mariadb.service rspamd.service
[Service]
Restart=always
ExecStartPre=/bin/install --owner 5000 --group 5000 -d /var/lib/container-service/mail
ExecStartPre=/bin/podman create --replace --pull never --net internal,mail,mariadb --env-file /etc/container-service/%N/%N.env \
--env-file /etc/container-service/rspamd/rspamd.env \
--publish 143:143 --publish 993:993 \
--volume /var/lib/container-service/mail:/var/mail:z \
--volume /etc/container-service/%N/service/config:/etc/%N/conf.d:z \
--volume /var/lib/container-service/letsencrypt/private:/etc/ssl/private:z \
--name %N localhost/%N:latest
ExecStart=/bin/podman start --attach %N
ExecStop=/bin/podman stop --time 10 %N
[Install]
WantedBy=multi-user.target