You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
version: "3.8"
|
|
|
|
secrets:
|
|
SMTP_HOST:
|
|
file: ../secrets/smtp/SMTP_HOST
|
|
SMTP_PORT:
|
|
file: ../secrets/smtp/SMTP_PORT
|
|
SMTP_USERNAME:
|
|
file: ../secrets/smtp/SMTP_USERNAME
|
|
SMTP_PASSWORD:
|
|
file: ../secrets/smtp/SMTP_PASSWORD
|
|
|
|
services:
|
|
smtp:
|
|
image: foxcpp/maddy:0.6
|
|
secrets: ["SMTP_HOST", "SMTP_PORT", "SMTP_USERNAME", "SMTP_PASSWORD"]
|
|
restart: unless-stopped
|
|
depends_on: ["smtp-setup"]
|
|
environment:
|
|
- MADDY_HOSTNAME=mx.${DOMAIN}
|
|
- MADDY_DOMAIN=${DOMAIN}
|
|
volumes:
|
|
- ../data/smtp/data:/data
|
|
# TODO: get from caddy?
|
|
- ../secrets/tls/fullchain.pem:/data/tls/fullchain.pem:ro
|
|
- ../secrets/tls/privkey.pem:/data/tls/privkey.pem:ro
|
|
ports:
|
|
- 25:25
|
|
- 143:143
|
|
- 587:587
|
|
- 993:993
|
|
|
|
smtp-setup:
|
|
container_name: smtp-setup
|
|
image: alpine
|
|
restart: no
|
|
secrets: ["SMTP_HOST", "SMTP_PORT", "SMTP_USERNAME", "SMTP_PASSWORD"]
|
|
volumes:
|
|
- ./secrets/check-secrets:/check-secrets:ro
|
|
entrypoint: ["/check-secrets"]
|
|
|