mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
postfix: Start on health-check pass
This commit is contained in:
parent
456e432cb7
commit
8de75fe927
@ -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
|
||||
|
@ -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
|
||||
|
@ -1 +1 @@
|
||||
FROM docker.io/rclone/rclone:1.61.1
|
||||
FROM docker.io/rclone/rclone:1.64.0
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user