Coder Social home page Coder Social logo

wernerfred / docker-rainloop Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 2.0 87 KB

Host your own rainloop using docker ๐Ÿณ๐Ÿ“ง

License: GNU Affero General Public License v3.0

Dockerfile 82.91% Shell 17.09%
docker docker-compose dockerhub rainloop webmail webmail-client imap-client sieve

docker-rainloop's Introduction

GitHub Workflow Status Docker Pulls GitHub Docker Image Size (latest semver) GitHub release (latest SemVer) Docker Image Version (latest semver) GitHub Release Date

Host your own rainloop instance using docker

This project allows you to host your own instance of rainloop community edition (licensed under GNU AGPL v3) using docker.

Installation

Build from source

To build this project from source make sure to clone the repository from github and change your working directroy into that newly created directory. Then simly issue the docker build like shown:

docker build -t wernerfred/docker-rainloop .

Pull from DockerHub

Another possibility is pulling the image directly from the DockerHub repository. Every release on this project automatically triggers a new build based on the master branch.

docker pull wernerfred/docker-rainloop

Run container

To run the container user docker run. You might adjust the following command according to your neeeds:

docker run -d \
           -p 80:80 \
           wernerfred/docker-rainloop

Persisting data

There are several ways to persists the data inside the container. The Dockerfile defines a unnamed volume so if you do not specify anything docker creates a unnamed volume by default and makes your data accessible to the host there (find and inspect it with docker volume commands). The other two options are using a named volume or a bind mount which can be configured as follows (docker-compose using bind mount):

version: '3'

services:
  rainloop:
    image: wernerfred/docker-rainloop:latest
    container_name: docker-rainloop
    restart: always
    ports:
      - 80:80
    volumes:
      - /opt/docker-rainloop/data:/rainloop/data

Configuration

To configure rainloop use the admin panel which can be accessed by: http://YOUR-IP/?admin The default login credentials are: admin and 12345. The configuration is saved to: /rainloop/data/_data_/_default_/configs/application.ini. For further configuration options see the official documentation.

Container structure and versions

The container uses the official php-apache base image. Rainloop is installed in the community edition to /rainloop. The data lives in /rainloop/data. Apache uses port 80. You can define the image version by specifying a version tag behind the image. The project aims to provides the same version number as the used rainloop installation starting from 1.14.0. So wernerfred/docker-rainloop:1.14.0 will use rainloop-community-1.14.0 in the container.

Reverse proxy

To secure the installation you should access the container through a reversy proxy which preferable will also handle SSL encryption for the connection.

Nginx

If using nginx as a local reverse proxy you could use the following configuration (docker-rainloop exposed on port 8080 and Let's Encrypt certs via certbot):

server {
    listen       80;
    server_name  <mail.domain.tld>;
    return       301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name <mail.domain.tld>;
    root /dev/null;

    access_log /var/log/nginx/<mail.domain.tld>.access.log combined;
    error_log /var/log/nginx/<mail.domain.tld>.error.log warn;

    location / {
      proxy_pass http://localhost:8080;
      proxy_set_header X-Forwarded-Host $host:$server_port;
      proxy_set_header X-Forwarded-Server $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    ssl_certificate /etc/letsencrypt/live/<mail.domain.tld>/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<mail.domain.tld>/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/<mail.domain.tld>/chain.pem;
    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;
}

Traefik

If you are using a reverse proxy like traefik you could use a configuration like this (traefik located in the same proxy network:

version: '3'

services:
  rainloop:
    image: wernerfred/docker-rainloop:latest
    container_name: docker-rainloop
    restart: always
    volumes:
      - /opt/docker-rainloop/data:/rainloop/data
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.rainloop-https.redirectscheme.scheme=https"
      - "traefik.http.routers.rainloop-http.entrypoints=web"
      - "traefik.http.routers.rainloop-http.rule=Host(`<mail.domain.tld>`)"
      - "traefik.http.routers.rainloop-http.middlewares=rainloop-https@docker"
      - "traefik.http.routers.rainloop-https.entrypoints=websecure"
      - "traefik.http.routers.rainloop-https.rule=Host(`<mail.domain.tld>`)"
      - "traefik.http.routers.rainloop-https.tls=true"
      - "traefik.http.routers.rainloop-https.tls.certresolver=letsencrypt"
      - "traefik.http.routers.rainloop-https.tls.domains[0].main=<mail.domain.tld>"

docker-rainloop's People

Contributors

dependabot[bot] avatar wernerfred avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-rainloop's Issues

php file upload options are to small = 2M

Hello All,

first of all i have to say thank you very much for creating and sharing your Project on GitHUB!
Thanks :-)

now the issue itself:
When I add an Attachement to an new email I got an red Alert with the subject "Filesize to big"

In the Administation Panal I can see php is set to:
PHP: upload_max_filesize = 2M; post_max_size = 8M

Can you change this setting within the Dockerfile crating progress for us please?

I would like to set this value to the maximum of my SMTP-Server. Or, alternatively to some value like 25MB

Thank you very much!

Pictures of the Issue:
2022-10-07_11-38-10
2022-10-07_11-40-17
2022-10-07_11-41-10

Data folder permission error

Hey Frederic,
after uploading my rainloop data from a different installation to your newly installed docker, I get the following error:

"[202] Data folder permissions error [mkdir]"

The files were uploaded with my synology user. Can I define the user in your docker? Or to witch user could I change the permissions?

Thanks

Portainer pulls from Docker Hub fail

Should I update my docker-compose to reflect a new download path? Presently it is:

version: '3'
services:
  rainloop:
    image: wernerfred/docker-rainloop:latest
    container_name: rainloop
    restart: always
    ports:
      - 80:80
    volumes:
      - ./rainloop/:/rainloop/data

So it defaults to Docker Hub. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.