mirror of
https://github.com/chatmail/relay.git
synced 2026-05-13 01:24:36 +00:00
docker: use buildx, stop services before portcheck
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM jrei/systemd-debian:12 AS base
|
||||
|
||||
ENV LANG=en_US.UTF-8
|
||||
|
||||
@@ -49,6 +49,16 @@ if [ -z "${CMDEPLOY_STAGES:-}" ] \
|
||||
&& [ "$(cat "$FINGERPRINT_FILE")" = "$current_fp" ]; then
|
||||
echo "[INFO] No changes detected ($current_fp), skipping deploy."
|
||||
else
|
||||
# Stop chatmail services so the port check sees a clean state.
|
||||
# (ss -p inside Docker can't always identify processes, causing false
|
||||
# "port occupied" failures.) The activate stage will restart them.
|
||||
echo "[INFO] Stopping services for clean port check..."
|
||||
systemctl stop postfix dovecot nginx opendkim unbound \
|
||||
filtermail doveauth chatmail-metadata iroh-relay mtail fcgiwrap 2>/dev/null || true
|
||||
|
||||
# Show listening ports before deploy (diagnostic for port-check failures)
|
||||
echo "[DEBUG] Listening ports before deploy:"
|
||||
ss -lptn | while IFS= read -r line; do echo " $line"; done
|
||||
export CMDEPLOY_STAGES="${CMDEPLOY_STAGES:-configure,activate}"
|
||||
$CMDEPLOY run --config "$CHATMAIL_INI" --ssh-host @local
|
||||
echo "$current_fp" > "$FINGERPRINT_FILE"
|
||||
|
||||
Reference in New Issue
Block a user