mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-06 22:44:59 +08:00
Replace localhost with 127.0.0.1 for healthcheck (#50)
Additionally change the commands in the pod probes from a single string to a list of strings.
This commit is contained in:
parent
9f66388199
commit
a956398b37
2 changed files with 16 additions and 7 deletions
|
@ -47,7 +47,7 @@ VOLUME [ "/var/spool/postfix", "/etc/postfix", "/etc/opendkim/keys" ]
|
|||
USER root
|
||||
WORKDIR /tmp
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD printf "EHLO healthcheck\n" | nc localhost 587 | grep -qE "^220.*ESMTP Postfix"
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"
|
||||
|
||||
EXPOSE 587
|
||||
CMD [ "/bin/sh", "-c", "/run.sh" ]
|
||||
|
|
|
@ -65,20 +65,29 @@ spec:
|
|||
readinessProbe:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 60
|
||||
command: >
|
||||
sh -c 'printf "EHLO healthcheck\n" | nc localhost 587 | grep -qE "^220.*ESMTP Postfix"'
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- 'printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"'
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 1
|
||||
command: >
|
||||
sh -c 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
|
||||
startupProbe:
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 5
|
||||
failureThreshold: 12
|
||||
command: >
|
||||
sh -c 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "{postfix-script}" && ps axf | fgrep -v grep | fgrep -q "{opendkim.sh}"'
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "{postfix-script}" && ps axf | fgrep -v grep | fgrep -q "{opendkim.sh}"'
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ $fullName | quote }}
|
||||
|
|
Loading…
Add table
Reference in a new issue