Browse Source

change max upload file size to 20m

master
filesite 2 years ago
parent
commit
648252a77c
  1. 6
      Dockerfile
  2. 3
      Dockerfile_samba
  3. 3
      bin/install.sh
  4. 2
      conf/nginx.conf
  5. 2
      conf/nginx_machete.conf

6
Dockerfile

@ -3,7 +3,11 @@ RUN apk add rsync nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev \ @@ -3,7 +3,11 @@ RUN apk add rsync nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \
&& mkdir -p /var/www/downloads && cd /var/www/downloads/ \
&& cd /usr/local/etc/php/ \
&& sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini \
&& sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini \
&& mkdir -p /var/www/downloads \
&& cd /var/www/downloads/ \
&& wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" \
&& tar -zxvf master.tar.gz \
&& rm -f master.tar.gz \

3
Dockerfile_samba

@ -8,7 +8,8 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n @@ -8,7 +8,8 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
&& yum -y install php82-php-fpm php82-php-gd php82-php-mbstring nginx wget rsync samba \
&& ln -s /opt/remi/php82/root/usr/sbin/php-fpm /usr/sbin/php-fpm \
&& cd /etc/opt/remi/php82/ \
&& sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini \
&& sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini \
&& sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini \
&& mkdir -p /var/www/downloads && cd /var/www/downloads/ \
&& wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" \
&& tar -zxvf master.tar.gz \

3
bin/install.sh

@ -20,7 +20,8 @@ rpm -ql php82-php-fpm-8.2.0~rc5-18.el7.remi @@ -20,7 +20,8 @@ rpm -ql php82-php-fpm-8.2.0~rc5-18.el7.remi
## replace configs in php.ini
cd /etc/opt/remi/php82/
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini
sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini
## zh_CN support
yum -y install kde-l10n-Chinese

2
conf/nginx.conf

@ -23,7 +23,7 @@ http { @@ -23,7 +23,7 @@ http {
keepalive_timeout 65;
types_hash_max_size 4096;
client_max_body_size 10m;
client_max_body_size 20m;
include /etc/nginx/mime.types;
default_type application/octet-stream;

2
conf/nginx_machete.conf

@ -6,7 +6,7 @@ server { @@ -6,7 +6,7 @@ server {
#charset UTF-8;
#access_log logs/machete.access.log main;
client_max_body_size 10m;
client_max_body_size 20m;
root /var/www/machete/www;
index index.php index.html;

Loading…
Cancel
Save