mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
add healthcheck for postfix
This commit is contained in:
parent
f0f5cea5d1
commit
1fc40bf932
@ -7,8 +7,11 @@ RUN apk add --no-cache postfix postfix-pcre rsyslog \
|
||||
|
||||
COPY conf /conf
|
||||
COPY start.py /start.py
|
||||
COPY health.sh /health.sh
|
||||
|
||||
EXPOSE 25/tcp 10025/tcp
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD /start.py
|
||||
|
||||
HEALTHCHECK CMD /health.sh
|
||||
|
8
core/postfix/health.sh
Executable file
8
core/postfix/health.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(echo QUIT|nc localhost 25|tail -n1|cut -f1 -d ' ')" = "221" ]; then
|
||||
echo "ping successful"
|
||||
else
|
||||
echo "ping failed"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user