Set longer timeouts; Use production docker nextcloud
This commit is contained in:
parent
0f5caed42b
commit
b47e006c9c
4 changed files with 32 additions and 11 deletions
|
|
@ -15,7 +15,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
# ============ NextCloud
|
# ============ NextCloud
|
||||||
nextcloud:
|
nextcloud:
|
||||||
image: nextcloud:27.1-fpm
|
build: ./images/nc
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- nc-data:/var/www/html
|
- nc-data:/var/www/html
|
||||||
|
|
@ -35,13 +35,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 1G
|
|
||||||
|
|
||||||
nextcloud-janitor:
|
nextcloud-janitor:
|
||||||
image: nextcloud:27.1-fpm
|
build: ./images/nc
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- nc-data:/var/www/html
|
- nc-data:/var/www/html
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
FROM nextcloud:25.0
|
FROM nextcloud:production-fpm
|
||||||
|
|
||||||
RUN echo "*/5 * * * * php -f /var/www/nextcloud/occ preview:pre-generate">> /var/spool/cron/crontabs/www-data
|
# Pregenerate previews
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y ffmpeg imagemagick && apt remove gcc -y && apt autoremove -y \
|
RUN echo "*/5 * * * * php -f /var/www/html/occ preview:pre-generate">> /var/spool/cron/crontabs/www-data
|
||||||
|
|
||||||
|
# Install app deps
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
ffmpeg imagemagick wget gnupg2 unzip
|
||||||
|
|
||||||
|
## Increase memory limits
|
||||||
|
COPY upload.ini /usr/local/etc/php/conf.d/upload.ini
|
||||||
|
|
||||||
|
# Remove residual gcc
|
||||||
|
RUN apt remove gcc -y && apt autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
||||||
6
images/nc/upload.ini
Normal file
6
images/nc/upload.ini
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
upload_max_filesize=16G
|
||||||
|
post_max_size=16G
|
||||||
|
max_input_time=3600
|
||||||
|
max_execution_time=3600
|
||||||
|
memory_limit=1G
|
||||||
|
output_buffering=0
|
||||||
|
|
@ -45,8 +45,13 @@ http {
|
||||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||||
|
|
||||||
# set max upload size
|
# set max upload size
|
||||||
client_max_body_size 512M;
|
client_max_body_size 1G;
|
||||||
|
|
||||||
|
# adjust buffering
|
||||||
|
client_body_temp_path /tmp/ngx 1 2;
|
||||||
|
proxy_buffering off;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
|
fastcgi_request_buffering off;
|
||||||
|
|
||||||
# Enable gzip but do not remove ETag headers
|
# Enable gzip but do not remove ETag headers
|
||||||
gzip on;
|
gzip on;
|
||||||
|
|
@ -141,6 +146,10 @@ http {
|
||||||
fastcgi_param PATH_INFO $path_info;
|
fastcgi_param PATH_INFO $path_info;
|
||||||
#fastcgi_param HTTPS on;
|
#fastcgi_param HTTPS on;
|
||||||
|
|
||||||
|
fastcgi_read_timeout 3600;
|
||||||
|
proxy_read_timeout 3600;
|
||||||
|
proxy_connect_timeout 3600;
|
||||||
|
|
||||||
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
||||||
fastcgi_param front_controller_active true; # Enable pretty urls
|
fastcgi_param front_controller_active true; # Enable pretty urls
|
||||||
fastcgi_pass php-handler;
|
fastcgi_pass php-handler;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue