Browse Source

Testing Roundcube

master
Siroco 3 months ago
commit
aba28dce25
Signed by: siroco GPG Key ID: 1324098302A514B0
  1. 9
      .env.example
  2. 21
      Dockerfile
  3. 57
      conf/nginx.conf
  4. 38
      conf/roundcube.nginx.conf
  5. 24
      docker-compose.yml

9
.env.example

@ -0,0 +1,9 @@
ROUNDCUBEMAIL_DB_HOST=roundcubedb
ROUNDCUBEMAIL_DB_NAME=roundcube
ROUNDCUBEMAIL_DB_PASSWORD=secret
ROUNDCUBEMAIL_DB_TYPE=pgsql
ROUNDCUBEMAIL_DB_USER=roundcube
ROUNDCUBEMAIL_DEFAULT_HOST=ssl://192.168.122.2
ROUNDCUBEMAIL_DEFAULT_PORT='993'
ROUNDCUBEMAIL_SKIN=elastic
ROUNDCUBEMAIL_SMTP_SERVER=tls://smtp.mail.com

21
Dockerfile

@ -0,0 +1,21 @@
FROM registry.sindominio.net/php-fpm
ENV SHA256 "2fdc7b1663e5e99706bff34093aa4731d4bf22a58cb555a2520ed1bde78d012c"
ENV ROUNDCUBEMAIL_VERSION 1.5.0
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl ca-certificates
RUN curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \
echo "${SHA256} roundcubemail.tar.gz" > roundcubemail.tar.gz.asc && \
sha256sum -c roundcubemail.tar.gz.asc && \
mkdir /roundcubemail && \
tar xf roundcubemail.tar.gz -C /roundcubemail --strip-components=1 --no-same-owner && \
rm -rf *.tar.gz *.asc;
RUN apt-get install -y --no-install-recommends \
php-exif php-gd php-intl php-ldap php-mysql php-zip php-pspell php-mbstring php-xml
# expose these volumes
VOLUME /roundcubemail

57
conf/nginx.conf

@ -0,0 +1,57 @@
user www-data;
worker_processes auto;
pid /tmp/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 128;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /tmp/access.log;
error_log /tmp/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

38
conf/roundcube.nginx.conf

@ -0,0 +1,38 @@
upstream roundcube {
server roundcubephp:9000;
}
server {
listen 8080;
server_name _;
root /roundcubemail;
index index.php index.html index.htm;
client_max_body_size 50M;
location / {
try_files $uri $uri/ =404;
}
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/(bin|SQL|config|temp|logs)/ {
deny all;
}
location ~* \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_pass roundcube;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
access_log /tmp/roundcube.access.log;
error_log /tmp/roundcube.error.log;
}

24
docker-compose.yml

@ -0,0 +1,24 @@
version: '3'
volumes:
roundcube:
services:
roundcubephp:
user: 1000:1000
build: .
restart: always
volumes:
- roundcube:/roundcubemail
nginx:
user: 1000:1000
image: registry.sindominio.net/nginx
restart: always
links:
- roundcubephp
ports:
- "0.0.0.0:3333:8080"
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./conf/roundcube.nginx.conf:/etc/nginx/sites-available/default:ro
- roundcube:/roundcubemail
Loading…
Cancel
Save