Phase 1: Docker image, supervisord, three-process cold start

Single bookworm-slim image running opendkim + panel + postfix under
supervisord with enforced start ordering (spec 4):

- build/Dockerfile: multi-stage static Go build; runtime installs postfix,
  opendkim, cyrus-sasl, supervisor, logrotate; unprivileged panel user (7.6.8).
- build/supervisord.conf: priority ordering opendkim -> panel -> postfix;
  crashexit event listener terminates the container on any FATAL process.
- build/postfix-wrapper.sh: waits for both milter sockets (test -S, 30s
  timeout) before `postfix start-fg`, exits non-zero on timeout.
- panel: HTTP :8080 stub + /healthz, journal-milter socket stub (so the
  wrapper's readiness probe passes), log-tailer stub; SIGTERM graceful stop.

Verified on the dev server: image builds, three processes live, panel serves
the stub, wrapper waits for sockets, and an unrecoverable panel failure brings
the container down cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 15:14:08 +03:00
parent cc2d9d43c0
commit e6aceeb811
10 changed files with 467 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
# OpenDKIM — Phase 1 minimal config.
#
# The goal here is only that OpenDKIM starts and exposes its milter socket so
# the Postfix start wrapper's readiness probe passes. Per-domain signing
# (KeyTable / SigningTable, Mode s) is generated and reloaded by the panel in
# Phase 3; until keys exist we run in verify-only mode so startup needs no keys.
Syslog no
UMask 007
Mode v
Socket local:/run/opendkim/opendkim.sock
PidFile /run/opendkim/opendkim.pid
UserID opendkim
Background no