Publish Alpine musl distroless Postfix as the sole latest image
Build and Push Docker Image / build (push) Successful in 1m25s
Build and Push Docker Image / build (push) Successful in 1m25s
This commit is contained in:
1 parent
2a9a7c6baa
commit
7ead00647b
12 files changed
+776
-1274
No files matched your search
+9
-14
@@ -1,7 +1,7 @@
|
||||
.PHONY: help build up down restart logs shell test clean status queue config
|
||||
.PHONY: help build up down restart logs test clean status queue config
|
||||
|
||||
# Change to parent directory for docker-compose commands
|
||||
COMPOSE=cd .. && docker-compose
|
||||
COMPOSE=cd .. && docker compose
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -22,7 +22,6 @@ help:
|
||||
@echo " make health - Check container health"
|
||||
@echo ""
|
||||
@echo "Maintenance:"
|
||||
@echo " make shell - Open shell in container"
|
||||
@echo " make config - Show Postfix configuration"
|
||||
@echo " make test - Send test email (auto-detects container)"
|
||||
@echo " Usage: make test TO=user@example.com [FROM=sender@domain.com]"
|
||||
@@ -68,10 +67,6 @@ logs:
|
||||
logs-tail:
|
||||
@$(COMPOSE) logs --tail=100
|
||||
|
||||
# Open shell in container
|
||||
shell:
|
||||
@$(COMPOSE) exec postfix bash
|
||||
|
||||
# Show container and Postfix status
|
||||
status:
|
||||
@echo "Container Status:"
|
||||
@@ -80,7 +75,7 @@ status:
|
||||
@echo ""
|
||||
@echo "Postfix Status:"
|
||||
@echo "==============="
|
||||
@$(COMPOSE) exec postfix postfix status || echo "Container not running"
|
||||
@$(COMPOSE) exec postfix /usr/local/bin/postfix-entrypoint --healthcheck || echo "Container not running"
|
||||
|
||||
# View mail queue
|
||||
queue:
|
||||
@@ -103,7 +98,7 @@ config:
|
||||
# Check Postfix configuration
|
||||
check:
|
||||
@echo "Checking Postfix configuration..."
|
||||
@$(COMPOSE) exec postfix postfix check
|
||||
@$(COMPOSE) exec postfix /usr/local/bin/postfix-entrypoint --check
|
||||
@$(COMPOSE) exec postfix postconf -c /etc/postfix/
|
||||
@echo "Configuration check complete"
|
||||
|
||||
@@ -117,14 +112,14 @@ test:
|
||||
echo " make test TO=user@example.com FROM=noreply@mydomain.com"; \
|
||||
echo " make test TO=user@example.com FROM=sender@domain.com SUBJECT='My Test'"; \
|
||||
echo ""; \
|
||||
echo "Note: Container is auto-detected from docker-postfix-postfix image"; \
|
||||
echo "Note: Container defaults to postfix-relay; override with CONTAINER=name"; \
|
||||
echo " FROM defaults to noreply@<DOMAIN> if not specified"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ -n "$(CONTAINER)" ]; then \
|
||||
./test-email.sh $(CONTAINER) $(TO) $(FROM) $(SUBJECT); \
|
||||
./test-email.sh "$(CONTAINER)" "$(TO)" "$(FROM)" "$(SUBJECT)"; \
|
||||
else \
|
||||
./test-email.sh $(TO) $(FROM) $(SUBJECT); \
|
||||
./test-email.sh "$(TO)" "$(FROM)" "$(SUBJECT)"; \
|
||||
fi
|
||||
|
||||
# Validate environment file
|
||||
@@ -159,7 +154,7 @@ clean-all: clean
|
||||
queue-detail:
|
||||
@echo "Detailed Queue Information:"
|
||||
@echo "=========================="
|
||||
@$(COMPOSE) exec postfix sh -c "postqueue -p | tail -n 1"
|
||||
@$(COMPOSE) exec -T postfix postqueue -p | tail -n 1
|
||||
|
||||
# Delete all queued messages
|
||||
queue-delete:
|
||||
@@ -176,7 +171,7 @@ queue-delete:
|
||||
debug:
|
||||
@echo "Restarting with DEBUG mode enabled..."
|
||||
@$(COMPOSE) down
|
||||
@cd .. && DEBUG=yes docker-compose up
|
||||
@cd .. && DEBUG=yes docker compose up
|
||||
|
||||
# Show real-time statistics
|
||||
stats:
|
||||
|
||||
Reference in new issue
Block a user