2021-01-13 16:36:50 +00:00
|
|
|
[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
|
2021-03-27 23:03:56 +00:00
|
|
|
ExecStart=/bin/podman run --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
|
2021-01-13 16:36:50 +00:00
|
|
|
ExecStop=/bin/podman stop --time 10 %N
|
2021-03-27 23:03:56 +00:00
|
|
|
ExecStopPost=/bin/podman rm --force %N
|
2021-01-13 16:36:50 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|