postfix: Start on health-check pass

This commit is contained in:
Alex Palaistras 2023-11-05 17:58:29 +00:00
parent 456e432cb7
commit 8de75fe927
5 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,8 @@ FROM docker.io/debian:bookworm-slim
ARG VERSION=3.7.6
RUN apt-get update -y && apt-get install -y --no-install-recommends \
postfix=${VERSION}* postfix-mysql=${VERSION}* syslog-ng-core gettext ca-certificates
postfix=${VERSION}* postfix-mysql=${VERSION}* syslog-ng-core gettext ca-certificates \
netcat-traditional
COPY container/config /etc/postfix
COPY container/run-postfix /run-postfix

View File

@ -4,9 +4,12 @@ Wants=container-build@%N.service dovecot.service
After=container-build@%N.service dovecot.service
[Container]
AutoUpdate=local
ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env
HealthCmd=sh -c 'printf "EHLO healthcheck\r\n" | nc -q 1 localhost 587 | grep -qE "^220.+ESMTP Postfix"'
Image=localhost/%N:latest
PodmanArgs=--sdnotify=healthy
PublishPort=25:25
PublishPort=465:465
PublishPort=587:587

View File

@ -1 +1 @@
FROM docker.io/rclone/rclone:1.61.1
FROM docker.io/rclone/rclone:1.64.0

View File

@ -9,9 +9,7 @@ Type=oneshot
SyslogIdentifier=%N
Environment=SOURCE=crypt:%i
ExecStartPre=/bin/install --mode 0700 -d /%I
ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env \
--volume /%I:/data:z localhost/rclone:latest \
sync ${SOURCE} /data
ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env --volume /%I:/data:z localhost/rclone:latest sync ${SOURCE} /data
[Install]
WantedBy=multi-user.target

View File

@ -8,9 +8,7 @@ ConditionDirectoryNotEmpty=/%I
Type=oneshot
SyslogIdentifier=%N
Environment=DESTINATION=crypt:%i
ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env \
--volume /%I:/data:z localhost/rclone:latest \
sync /data ${DESTINATION}
ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env --volume /%I:/data:z localhost/rclone:latest sync /data ${DESTINATION}
[Install]
WantedBy=multi-user.target