dovecot: Enable and start on health-check pass

This commit is contained in:
Alex Palaistras 2023-10-29 16:22:26 +00:00
parent 36e1e3039e
commit f536787fb6
3 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,7 @@ ARG VERSION=2.3.19
RUN apt-get update -y && apt-get install -y --no-install-recommends \
dovecot-imapd=1:${VERSION}* dovecot-lmtpd=1:${VERSION}* dovecot-mysql=1:${VERSION}* \
dovecot-sieve=1:${VERSION}* dovecot-managesieved=1:${VERSION}* dovecot-fts-xapian \
gettext ca-certificates curl
gettext ca-certificates curl netcat-traditional
RUN rm -Rf /etc/dovecot
COPY container/config /etc/dovecot

View File

@ -0,0 +1,6 @@
service health-check {
executable = script -p health-check.sh
inet_listener health-check {
port = 5001
}
}

View File

@ -9,8 +9,10 @@ AddCapability=SYS_CHROOT
ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env
EnvironmentFile=%E/coreos-home-server/rspamd/rspamd.env
HealthCmd=sh -c 'echo PING | nc -q 1 localhost 5001 | grep -q PONG'
Image=localhost/%N:latest
Network=internal
PodmanArgs=--sdnotify=healthy
PublishPort=143:143
PublishPort=993:993
PublishPort=4190:4190