Files
stacks/mailpit/compose.yml
T
valknar ebbf837f57 feat(coolify): configure Mailpit as SMTP backend
Also fix mailpit UI bind address (0 → 8025) and add Traefik labels.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 17:47:01 +02:00

41 lines
1.6 KiB
YAML

services:
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
environment:
TZ: ${TIMEZONE:-Europe/Amsterdam}
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
MP_MAX_MESSAGES: 5000
MP_SMTP_RELAY_ALL: "true"
MP_SMTP_RELAY_HOST: ${SMTP_RELAY_HOST}
MP_SMTP_RELAY_PORT: ${SMTP_RELAY_PORT}
MP_SMTP_RELAY_USERNAME: ${SMTP_RELAY_USERNAME}
MP_SMTP_RELAY_PASSWORD: ${SMTP_RELAY_PASSWORD}
MP_SMTP_RELAY_AUTH: plain
MP_SMTP_RELAY_TLS: "true"
MP_UI_BIND_ADDR: 0.0.0.0:8025
volumes:
- ../.data/mailpit:/data
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.mailpit-redirect-web-secure.redirectscheme.scheme=https"
- "traefik.http.routers.mailpit-web.middlewares=mailpit-redirect-web-secure"
- "traefik.http.routers.mailpit-web.rule=Host(`${TRAEFIK_HOST}`)"
- "traefik.http.routers.mailpit-web.entrypoints=web"
- "traefik.http.routers.mailpit-web.service=mailpit"
- "traefik.http.routers.mailpit-web-secure.rule=Host(`${TRAEFIK_HOST}`)"
- "traefik.http.routers.mailpit-web-secure.tls.certresolver=resolver"
- "traefik.http.routers.mailpit-web-secure.entrypoints=web-secure"
- "traefik.http.routers.mailpit-web-secure.middlewares=security-headers@file,no-index@file"
- "traefik.http.routers.mailpit-web-secure.service=mailpit"
- "traefik.http.services.mailpit.loadbalancer.server.port=8025"
- "traefik.docker.network=${NETWORK_NAME}"
networks:
- compose_network
networks:
compose_network:
name: ${NETWORK_NAME}
external: true