This commit is contained in:
Dennis Schwerdel 2020-06-16 16:16:50 +02:00
parent 9ef3b652fc
commit 4dcc9e8424
3 changed files with 22 additions and 3 deletions

View File

@ -13,7 +13,7 @@ RUN wget http://nginx.org/keys/nginx_signing.key && \
ADD nginx.conf /app/code/nginx.conf.default
ADD public /app/code/public.default
ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf
ADD fpm.conf /etc/php/7.2/fpm/php-fpm.conf
ADD start.sh /app/code/start.sh
RUN mkdir /run/nginx && \

View File

@ -14,13 +14,21 @@ http {
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_buffers 16 8k;
server {
listen 8000;
root /app/data/public;
index index.php index.html index.htm;
try_files $uri $uri/ =404;
try_files $uri $uri/index.html $uri/ =404;
absolute_redirect off;
# Uncomment to add a redirect
@ -55,6 +63,17 @@ http {
location ~ /\.ht {
deny all;
}
# Cache statif files
location ~* \.html$ {
expires 1h;
}
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|mp3|ttf|css|rss|atom|js|jpg|jpeg|webp|webm|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)(\?.+)?$ {
access_log off;
log_not_found off;
expires max;
}
}
}

View File

@ -14,5 +14,5 @@ chown -R cloudron:cloudron /app/data
export HOME=/app/data
/usr/sbin/php-fpm7.0 &
/usr/sbin/php-fpm7.2 &
exec /usr/sbin/nginx -c /app/data/nginx.conf -g 'daemon off;'