From 680e7d606e9fe2ef325f4b007863e19a7c6b64d2 Mon Sep 17 00:00:00 2001 From: chrisblech Date: Sun, 4 Jan 2026 23:18:46 +0000 Subject: [PATCH] Change starting order/dependencies, add Healthchecks, expose only port 25 Upstream documentation tells to start postfix first, then email-, then job-runner container. We add postgres as dependency to postfix, and add healthchecks so postfix waits until certificate files are ready, and postfix-dependencies will wait until postfix is started and responding MTAs only use port 25 to exchange mails. As connecting/authenticating users (via mail-client and ESMTP submission-protocol) is not a use-case for this project, we do not need port 587. --- postfix-compose.yaml | 27 ++++++++++++++++++++------- postfix/Dockerfile | 3 ++- simple-login-compose.yaml | 4 ++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/postfix-compose.yaml b/postfix-compose.yaml index fe5531d..3ae540f 100644 --- a/postfix-compose.yaml +++ b/postfix-compose.yaml @@ -13,13 +13,20 @@ services: env_file: .env ports: - '25:25' - - '587:587' volumes: - certs:/certs:ro restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "nc -w 3 127.0.0.1 25