services:

  snappymail:
    image: ghcr.io/waldner/snappymail-docker:latest
    container_name: ${snappymailServName}
    hostname: ${snappymailHost}
    restart: ${restartPolicy}
    volumes:
      - data:/snappymail/data
      - snappymail:/snappymail/snappymail
    networks:
      snappymailNet:
      postfixNet:
    ports:
       - 80
    env_file:
       - ../../secret/env-${snappymailServName}
    labels:
       - "traefik.enable=true"
       - "traefik.http.routers.${snappymailServName}.rule=host(`${snappymailHost}.${domain}`)"
       - "traefik.docker.network=snappymailNet"
volumes:
  data:
  snappymail:
networks:
  snappymailNet:
    external: true
    name: snappymailNet
  postfixNet:
    external: true
    name: postfixNet
