From 4678bcebe07422c6ce49e46305c6de0087f8cd22 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Fri, 16 Sep 2022 08:17:02 +0200 Subject: [PATCH] Add roundcube to mail stack for webaccess. --- mail/docker-compose.yaml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/mail/docker-compose.yaml b/mail/docker-compose.yaml index 2f05904..ff83724 100644 --- a/mail/docker-compose.yaml +++ b/mail/docker-compose.yaml @@ -18,6 +18,10 @@ volumes: name: mail-logs mail-config: name: mail-config + roundcube-config: + name: roundcube-config + roundcube-db: + name: roundcube-db services: mailserver: @@ -51,6 +55,7 @@ services: retries: 0 networks: - proxy + - mail labels: - "traefik.enable=true" - "traefik.tcp.routers.smtp.rule=HostSNI(`*`)" @@ -74,3 +79,57 @@ services: - "traefik.tcp.routers.sieve.service=sieve" - "traefik.tcp.services.sieve.loadbalancer.server.port=4190" + roundcube: + image: roundcubeorg/roundcubemail:latest-apache + container_name: roundcube + hostname: roundcube + domainname: steinle-computer.de + environment: + - ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.steinle-computer.de + - ROUNDCUBEMAIL_DEFAULT_PORT=993 + - ROUNDCUBEMAIL_SMTP_SERVER=ssl://mail.steinle-computer.de + - ROUNDCUBEMAIL_SMTP_PORT=465 + - ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE=30M + - ROUNDCUBEMAIL_DB_TYPE=mysql + - ROUNDCUBEMAIL_DB_HOST=roundcube-db + - ROUNDCUBEMAIL_DB_PORT=3306 + - ROUNDCUBEMAIL_DB_USER=roundcube + - ROUNDCUBEMAIL_DB_PASSWORD=6mqqZP4pSKnbxF8HQYGrb6fnyQw4Bf + - ROUNDCUBEMAIL_DB_NAME=roundcube + restart: unless-stopped + volumes: + - roundcube-config:/var/roundcube/config + networks: + - proxy + - mail + labels: + - "traefik.enable=true" + - "traefik.http.routers.roundcube.rule=Host(`webmail.steinle-computer.de`)" + - "traefik.http.routers.roundcube.entrypoints=web" + - "traefik.http.routers.roundcube.middlewares=roundcube" + - "traefik.http.middlewares.roundcube.redirectscheme.scheme=https" + - "traefik.http.routers.roundcube-secure.rule=Host(`webmail.steinle-computer.de`)" + - "traefik.http.routers.roundcube-secure.entrypoints=websecure" + - "traefik.http.routers.roundcube-secure.tls=true" + - "traefik.http.routers.roundcube-secure.tls.certresolver=infomaniak" + - "traefik.http.routers.roundcube-secure.service=roundcube-secure" + - "traefik.http.services.roundcube-secure.loadbalancer.server.port=80" + + roundcube-db: + image: mysql:8 + container_name: roundcube-db + hostname: roundcube-db + command: --default-authentication-plugin=mysql_native_password + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: 6mqqZP4pSKnbxF8HQYGrb6fnyQw4Bf + MYSQL_USER: roundcube + MYSQL_PASSWORD: 6mqqZP4pSKnbxF8HQYGrb6fnyQw4Bf + MYSQL_DATABASE: roundcube + volumes: + - roundcube-db:/var/lib/mysql + networks: + - mail + healthcheck: + test: ["CMD-SHELL", "mysqladmin ping -uroundcube -p6mqqZP4pSKnbxF8HQYGrb6fnyQw4Bf"] +