Comments (2)
Hello,
I tried to reproduce using the test suite but I was not able to achieve the described situation.
Could you share your docker-compose.yml?
Thanks
from docker-mailserver-traefik.
This is my docker-compose.yml
file:
version: '3'
services:
cert-renewer-traefik:
image: youtous/mailserver-traefik:latest
container_name: "mailserver-traefik"
networks:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- <my-services-folder>/traefik/acme.json:/tmp/traefik/acme.json:ro # link traefik acme.json file (read-only)
environment:
- TRAEFIK_VERSION=2
- CERTS_SOURCE=file
- DOMAINS=${HOSTNAME}.${DOMAINNAME}
mail:
image: tvial/docker-mailserver:latest
hostname: ${HOSTNAME}
domainname: ${DOMAINNAME}
container_name: ${CONTAINER_NAME}
ports:
- "25:25"
- "143:143"
- 465:465
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- maillogs:/var/log/mail
- ./config/:/tmp/docker-mailserver/
env_file:
- .env
- env-mailserver
labels:
- "mailserver-traefik.renew.domain=${HOSTNAME}.${DOMAINNAME}" # tag the service
- "traefik.enable=true" # use traefik v2 for certificate generation
- "traefik.port=443" # dummy port, required generating certs with traefik
- "traefik.http.routers.mail.rule=Host(`${HOSTNAME}.${DOMAINNAME}`)"
- "traefik.http.routers.mail.entrypoints=https"
- "traefik.http.routers.mail.tls=true"
- "traefik.http.routers.mail.tls.certresolver=le"
- "traefik.http.routers.mail.middlewares=redirect-webmail@docker" # /!\ the router must redirect every requests.
- "traefik.http.middlewares.redirect-webmail.redirectregex.regex=.*"
- "traefik.http.middlewares.redirect-webmail.redirectregex.replacement=https://${HOSTNAME}.${DOMAINNAME}/"
environment:
- SSL_TYPE=manual # enable SSL on the *mailserver* and store certificates in pre-defined paths
- SSL_CERT_PATH=/var/mail-state/manual-ssl/cert # don't change theses paths!
- SSL_KEY_PATH=/var/mail-state/manual-ssl/key
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: always
networks:
- web
roundcube:
image: "roundcube/roundcubemail"
container_name: "roundcube"
restart: always
networks:
- web
environment:
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://${HOSTNAME}.${DOMAINNAME}:993/
- ROUNDCUBEMAIL_SMTP_SERVER=tls://${HOSTNAME}.${DOMAINNAME}:465/
labels:
- traefik.http.routers.roundcube.rule=Host(`${HOSTNAME}.${DOMAINNAME}`)
- traefik.http.routers.roundcube.tls=true
- traefik.http.routers.roundcube.tls.certresolver=le
- traefik.http.middlewares.roundcube.compress=true
- traefik.http.routers.roundcube.middlewares=roundcube@docker
volumes:
maildata:
driver: local
mailstate:
driver: local
maillogs:
driver: local
networks:
web:
external: true
web
is the network where Traefik lives.
from docker-mailserver-traefik.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-mailserver-traefik.