Adding the configuration change for multiple provider, Making the service run in foreground and adding test
This commit is contained in:
1 parent
85ab503afb
commit
4eaa4d91ea
10 files changed
+1639
-140
No files matched your search
+45
-16
@@ -1,19 +1,48 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
postfix:
|
||||
container_name: postfix
|
||||
image: docker.io/k2patel/postfix:latest
|
||||
ports:
|
||||
- "10825:25/tcp"
|
||||
environment:
|
||||
TIMEZONE: ${TIMEZONE}
|
||||
SMTP_SERVER: ${SMTP_SERVER}
|
||||
SERVER_HOSTNAME: ${SERVER_HOSTNAME}
|
||||
SMTP_PORT: ${SMTP_PORT}
|
||||
DOMAIN: ${DOMAIN}
|
||||
SMTP_USERNAME: ${SMTP_USERNAME}
|
||||
SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||
volumes:
|
||||
- "${DATA_FOLDER}/logs:/var/log"
|
||||
- "${DATA_FOLDER}/mail:/var/mail"
|
||||
- "${DATA_FOLDER}/spool:/var/spool/postfix"
|
||||
build: .
|
||||
container_name: postfix-relay
|
||||
hostname: ${SERVER_HOSTNAME:-postfix-relay}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${SMTP_LISTEN_PORT:-25}:25"
|
||||
environment:
|
||||
- TIMEZONE=${TIMEZONE:-America/New_York}
|
||||
- SMTP_SERVER=${SMTP_SERVER}
|
||||
- SMTP_PORT=${SMTP_PORT:-587}
|
||||
- SMTP_USERNAME=${SMTP_USERNAME}
|
||||
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
- DOMAIN=${DOMAIN}
|
||||
- SERVER_HOSTNAME=${SERVER_HOSTNAME}
|
||||
- SMTP_NETWORKS=${SMTP_NETWORKS}
|
||||
- SMTP_HEADER_TAG=${SMTP_HEADER_TAG}
|
||||
- DEBUG=${DEBUG:-no}
|
||||
volumes:
|
||||
- "${DATA_FOLDER:-.}/logs:/var/log"
|
||||
- "${DATA_FOLDER:-.}/mail:/var/mail"
|
||||
- "${DATA_FOLDER:-.}/spool:/var/spool/postfix"
|
||||
networks:
|
||||
- postfix-network
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
labels: "service=postfix-relay"
|
||||
healthcheck:
|
||||
test: ["CMD", "postfix", "status"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
networks:
|
||||
postfix-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
gateway: 172.28.0.1
|
||||
Reference in new issue
Block a user