mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
initial commit
This commit is contained in:
42
rainloop/Dockerfile
Normal file
42
rainloop/Dockerfile
Normal file
@ -0,0 +1,42 @@
|
||||
FROM alpine:3.3
|
||||
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
|
||||
|
||||
ENV GID=1000 UID=1000
|
||||
|
||||
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||
&& apk -U add \
|
||||
nginx \
|
||||
php-fpm \
|
||||
php-curl \
|
||||
php-iconv \
|
||||
php-xml \
|
||||
php-dom \
|
||||
php-openssl \
|
||||
php-json \
|
||||
php-zlib \
|
||||
php-pdo_mysql \
|
||||
php-pdo_sqlite \
|
||||
php-sqlite3 \
|
||||
supervisor \
|
||||
gnupg \
|
||||
tini@commuedge \
|
||||
&& wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip -P /tmp \
|
||||
&& wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip.asc -P /tmp \
|
||||
&& wget -q http://repository.rainloop.net/RainLoop.asc -P /tmp \
|
||||
&& gpg --import /tmp/RainLoop.asc \
|
||||
&& gpg --verify /tmp/rainloop-community-latest.zip.asc \
|
||||
&& mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.zip -d /rainloop \
|
||||
&& apk del gnupg \
|
||||
&& rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY php-fpm.conf /etc/php/php-fpm.conf
|
||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
|
||||
VOLUME /rainloop/data
|
||||
EXPOSE 80
|
||||
LABEL description "Fast, simple and modern webmail client"
|
||||
CMD ["tini","--","run.sh"]
|
46
rainloop/README.md
Normal file
46
rainloop/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
## wonderfall/rainloop
|
||||
[](https://imagelayers.io/?images=wonderfall/rainloop:latest 'Get your own badge on imagelayers.io')
|
||||
|
||||

|
||||
|
||||
#### What is this?
|
||||
Rainloop is a SIMPLE, MODERN & FAST WEB-BASED EMAIL CLIENT. More info on the [official website](http://www.rainloop.net/).
|
||||
|
||||
#### Features
|
||||
- Based on Alpine 3.3
|
||||
- Latest Rainloop **Community Edition** (stable)
|
||||
- Extremely lightweight
|
||||
- Contacts (DB) : sqlite, or mysql (server not built-in)
|
||||
|
||||
#### Environment variables
|
||||
- **GID** : rainloop group id.
|
||||
- **UID** : rainloop user id.
|
||||
|
||||
#### Volumes
|
||||
- **/rainloop/data** : rainloop's data
|
||||
|
||||
#### Docker Compose (example)
|
||||
```
|
||||
rainloop:
|
||||
image: wonderfall/rainloop
|
||||
environment:
|
||||
- GID=1000
|
||||
- UID=1000
|
||||
volumes:
|
||||
- /mnt/rainloop:/rainloop/data
|
||||
|
||||
# if using mysql as contacts database
|
||||
|
||||
db_rainloop:
|
||||
image: mariadb:10
|
||||
volumes:
|
||||
- /mnt/rainloop/db:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=supersecretpassword
|
||||
- MYSQL_DATABASE=rainloop
|
||||
- MYSQL_USER=rainloop
|
||||
- MYSQL_PASSWORD=supersecretpassword
|
||||
```
|
||||
|
||||
#### Reverse proxy
|
||||
https://github.com/Wonderfall/dockerfiles/tree/master/reverse
|
71
rainloop/nginx.conf
Normal file
71
rainloop/nginx.conf
Normal file
@ -0,0 +1,71 @@
|
||||
user rainloop;
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 15;
|
||||
keepalive_disable msie6;
|
||||
keepalive_requests 100;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay off;
|
||||
server_tokens off;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 5;
|
||||
gzip_min_length 512;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_proxied any;
|
||||
gzip_vary on;
|
||||
gzip_disable "msie6";
|
||||
gzip_types
|
||||
text/css
|
||||
text/javascript
|
||||
text/xml
|
||||
text/plain
|
||||
text/x-component
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/vnd.ms-fontobject
|
||||
font/truetype
|
||||
font/opentype
|
||||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /rainloop;
|
||||
index index.php index.html;
|
||||
|
||||
location ^~ /data {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
15
rainloop/php-fpm.conf
Normal file
15
rainloop/php-fpm.conf
Normal file
@ -0,0 +1,15 @@
|
||||
[global]
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
user = rainloop
|
||||
group = rainloop
|
||||
listen = /var/run/php-fpm.sock
|
||||
listen.owner = rainloop
|
||||
listen.group = rainloop
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
chdir = /
|
5
rainloop/run.sh
Normal file
5
rainloop/run.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
addgroup -g ${GID} rainloop && adduser -h /rainloop -s /bin/sh -D -G rainloop -u ${UID} rainloop
|
||||
|
||||
chown -R rainloop:rainloop /rainloop /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||
supervisord -c /usr/local/etc/supervisord.conf
|
8
rainloop/supervisord.conf
Normal file
8
rainloop/supervisord.conf
Normal file
@ -0,0 +1,8 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm
|
||||
|
||||
[program:nginx]
|
||||
command=nginx
|
Reference in New Issue
Block a user