mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 04:18:09 +00:00
docker: extract cert monitor from background process to systemd timer
The cert monitoring was an orphaned background process (`monitor_certificates &`) Replace with a proper systemd timer/service (every 60s). Also made journald ForwardToConsole=yes idempotent.
This commit is contained in:
@@ -77,6 +77,12 @@ RUN rm -f /etc/nginx/sites-enabled/default
|
||||
COPY --chmod=555 ./docker/files/setup_chatmail_docker.sh /setup_chatmail_docker.sh
|
||||
COPY --chmod=555 ./docker/files/entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Certificate monitoring as a proper systemd timer (not a background process)
|
||||
COPY --chmod=555 ./docker/files/chatmail-certmon.sh /chatmail-certmon.sh
|
||||
COPY ./docker/files/chatmail-certmon.service /lib/systemd/system/chatmail-certmon.service
|
||||
COPY ./docker/files/chatmail-certmon.timer /lib/systemd/system/chatmail-certmon.timer
|
||||
RUN ln -sf /lib/systemd/system/chatmail-certmon.timer /etc/systemd/system/timers.target.wants/chatmail-certmon.timer
|
||||
|
||||
HEALTHCHECK --interval=60s --timeout=10s --retries=3 \
|
||||
CMD systemctl is-active dovecot postfix nginx unbound opendkim filtermail doveauth chatmail-metadata || exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user