services:
  mailrise:
    image: ${MAILRISE_IMAGE}:${MAILRISE_TAG}
    container_name: ${MAILRISE_CONTAINER_NAME}
    restart: ${MAILRISE_RESTART_POLICY}
    command: -vv /etc/mailrise.conf
    security_opt:
      - no-new-privileges:true
#    ports:
#      - ${MAILRISE_PORT:-8025}:8025
    volumes:
      - ${DOCKERDIR}/mailrise/mailrise.conf:/etc/mailrise.conf:ro
    networks:
      - proxy
    labels:
      traefik.enable: true
      traefik.tcp.routers.mailrise.rule: HostSNI(`*`)
      traefik.tcp.routers.mailrise.tls: true
      traefik.tcp.routers.mailrise.tls.certresolver: ${CERTRESOLVER}
      traefik.tcp.routers.mailrise.tls.domains[0].main: mailrise.lab.gurulandia.eu
      traefik.tcp.routers.mailrise.tls.domains[0].sans: ""
      traefik.tcp.routers.mailrise.entrypoints: mailsecure,maildefault
      traefik.docker.network: proxy