Add first config for snappymail

This commit is contained in:
Andreas Zweili 2022-09-08 21:23:19 +02:00
parent fe8dd38de7
commit feff7084a6
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,23 @@
ersion: '3.0'
services:
# PHP FPM Server
php:
image: ghcr.io/nebucatnetzer/snappymail-aarch64/snappymail:latest
volumes:
- ./src:/var/www
- ./snappymail.ini:/usr/local/etc/php/conf.d/snappymail.ini
extra_hosts:
- "host.docker.internal:host-gateway"
# Nginx load balancer translating to PHP FPM
nginx:
image: nginx:latest
hostname: nginx
depends_on:
- php
ports:
- "8080:80"
volumes:
- ./src:/var/www
- ./snappy_nginx.conf:/etc/nginx/conf.d/default.conf

View File

@ -0,0 +1,46 @@
server {
listen 80 default;
server_name localhost _;
root /var/www;
index index.php index.html;
autoindex on;
charset utf-8;
client_max_body_size 500m;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
gzip_vary on;
access_log /var/log/nginx/default.access.log;
error_log /var/log/nginx/default.error.log;
location = /favicon.ico { access_log off; log_not_found off; }
location ~* favicon\.(ico|png)$ { access_log off; log_not_found off; }
location = /browserconfig.xml { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location = /humans.txt { access_log off; log_not_found off; }
location = /apple-touch-icon.png { access_log off; log_not_found off; }
location = /apple-touch-icon-precomposed.png { access_log off; log_not_found off; }
location ~ /\.ht { deny all; return 404; }
location ~ /\.git { deny all; return 404; }
location ~ /\.svn { deny all; return 404; }
location ~* ^.+\.(?:jpe?g|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
access_log off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location ~ \.php(/|$) {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_pass php:9000;
}
}

View File

@ -0,0 +1,3 @@
date.timezone = UTC
upload_max_filesize = 24M
post_max_size = 25M