# Roundcube ProtonMail Bridge
# Port: 8080
# Webmail with ProtonMail support

version: "3.9"

services:
  roundcube-protonmail:
    image: roundcube/roundcubemail:latest
    container_name: roundcube-protonmail
    environment:
      # ProtonMail Bridge IMAP + SMTP (plain inside the Docker network)
      ROUNDCUBEMAIL_DEFAULT_HOST: protonmail-bridge
      ROUNDCUBEMAIL_DEFAULT_PORT: 143
      ROUNDCUBEMAIL_SMTP_SERVER: protonmail-bridge
      ROUNDCUBEMAIL_SMTP_PORT: 25
      ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE: 25M
      ROUNDCUBEMAIL_SKIN: elastic
    volumes:
      - /mnt/atlantis_docker/roundcube_protonmail/data:/var/roundcube
      - /mnt/atlantis_docker/roundcube_protonmail/config:/var/roundcube/config
      - /mnt/atlantis_docker/roundcube_protonmail/logs:/var/roundcube/logs
    ports:
      - "7513:80"   # exposed via your tailnet (change if needed)
    restart: unless-stopped
    depends_on:
      - protonmail-bridge

  protonmail-bridge:
    image: shenxn/protonmail-bridge:latest
    container_name: protonmail-bridge
    environment:
      - TZ=America/Los_Angeles
    command: ["protonmail-bridge", "--no-keychain", "--cli"]
    volumes:
      - /mnt/atlantis_docker/roundcube_protonmail/bridge:/root/.config/protonmail/bridge
    restart: unless-stopped
