docker-dovecot/docker-compose_solr_traefik.yml
2022-11-16 04:23:42 +01:00

50 lines
1.3 KiB
YAML

version: "3.8"
services:
dovecot:
image: mbirth/dovecot:latest
restart: unless-stopped
volumes:
- /opt/docker/dovecot/conf:/conf
- /opt/docker/dovecot/data:/data
#ports:
# - 10143:143
links:
- solr
depends_on:
- solr
networks:
- traefik-public
- mailarch-network
labels:
# Create TCP endpoint in Traefik called "imaps" on port 993
# Traefik will do the TLS part and forward it plaintext to 143 here
traefik.enable: "true"
traefik.tcp.routers.dovecot.entrypoints: imaps
traefik.tcp.routers.dovecot.rule: HostSNI(`*`)
traefik.tcp.routers.dovecot.tls: true
traefik.tcp.routers.dovecot.tls.passthrough: false
traefik.tcp.routers.dovecot.tls.certresolver: le
traefik.tcp.routers.dovecot.tls.domains.main: "mailserver.domain.com"
traefik.tcp.services.dovecot.loadbalancer.server.port: "143"
solr:
image: solr:latest
restart: unless-stopped
environment:
LANG: C.UTF-8
SOLR_SSL_ENABLED: "false"
networks:
- mailarch-network
volumes:
- /opt/docker/dovecot/solr/var-solr:/var/solr
- /opt/docker/dovecot/solr:/setupdata
ports:
- 8983:8983
networks:
traefik-public:
external: true
mailarch-network:
attachable: true