coreos-home-server/service/dovecot/systemd/dovecot.service
Alex Palaistras 011650105b Implement metrics with Grafana and Prometheus
This commit adds two services, `grafana` and `prometheus`, and sets up
some existing services (`dovecot` and `prosody`) to expose metrics into
Grafana. In addition, systemd services have been added to facilitate
registering metrics for services into Prometheus, as well as
automatically provisioning Grafana dashboards based on static JSON
representations.

This work will continue to evolve as more services gain proper Grafana
dashboards, and Loki is also integrated for access to the systemd
journal.
2022-04-25 20:12:06 +01:00

26 lines
1.1 KiB
Desktop File

[Unit]
Description=Dovecot POP3/IMAP Server
Wants=container-build@%N.service container-volume@%N.service mariadb.service rspamd.service grafana-dashboard@dovecot.service
After=container-build@%N.service container-volume@%N.service mariadb.service rspamd.service
Before=grafana-dashboard@dovecot.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
--env-file %E/coreos-home-server/%N/%N.env \
--env-file %E/coreos-home-server/rspamd/rspamd.env \
--publish 143:143 --publish 993:993 --publish 4190:4190 \
--volume %N:/var/mail:z \
--volume letsencrypt:/etc/ssl/private:z,ro \
localhost/%N:latest
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
ExecReload=/bin/podman exec %N doveadm -v reload
[Install]
WantedBy=multi-user.target