This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
postfix-relay/compose.yml

40 lines
1.4 KiB
YAML
Raw Normal View History

2020-09-26 09:17:53 +00:00
version: "3.8"
services:
app:
2021-04-03 12:38:47 +00:00
image: "boky/postfix:v3.0.0"
2020-09-26 09:17:53 +00:00
networks:
- proxy
2020-09-26 14:18:02 +00:00
healthcheck:
2021-04-04 23:15:11 +00:00
test: ["CMD", "sh", "-c", "netstat -an | fgrep 587 | fgrep -q LISTEN"]
2020-09-26 14:18:02 +00:00
interval: 10s
timeout: 5s
start_period: 10s
retries: 2
environment:
FORCE_COLOR: "1"
TZ: ${TZ}
INBOUND_DEBUGGING: ${INBOUND_DEBUGGING}
ALLOWED_SENDER_DOMAINS: ${DOMAIN} ${EXTRA_SENDER_DOMAINS}
POSTFIX_myhostname: ${DOMAIN}
2020-09-26 09:17:53 +00:00
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
2020-09-26 14:18:02 +00:00
- "traefik.tcp.routers.${STACK_NAME}.entrypoints=smtp-submission"
- "traefik.tcp.routers.${STACK_NAME}.rule=HostSNI(`*`)"
# TODO 3wc: we can only route TCP traffic if it uses TLS
# https://doc.traefik.io/traefik/v2.0/routing/routers/#rule_1
#- "traefik.tcp.routers.${STACK_NAME}.rule=HostSNI(`${DOMAIN}`)"
- "traefik.tcp.routers.${STACK_NAME}.service=${STACK_NAME}"
- "traefik.tcp.services.${STACK_NAME}.loadbalancer.server.port=587"
#- "traefik.tcp.routers.${STACK_NAME}.tls.passthrough=true"
#- "traefik.tcp.routers.${STACK_NAME}.tls=true"
#- "traefik.tcp.routers.${STACK_NAME}.service=mailu_smtp"
2020-09-26 09:17:53 +00:00
2021-04-04 23:15:11 +00:00
- coop-cloud.${STACK_NAME}.app.version=v3.0.0-282de498
2020-09-26 09:17:53 +00:00
networks:
proxy:
external: true