default customizable post size
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Paolo Asperti 2025-04-02 12:54:02 +02:00
parent 96f0922f9f
commit b97b5665d6
Signed by: paspo
GPG Key ID: 06D46905D19D5182
2 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,7 @@
WEBROOT=/data/www
WEBDAV_PORT=${WEBDAV_PORT:-8080}
PHP=${PHP:-none}
POSTSIZE=${POSTSIZE:-256M}
USERNAME=${USERNAME:-theuser}
PUID=${PUID:-1000}
GROUPNAME=${GROUPNAME:-thegroup}
@ -36,11 +37,21 @@ pm.max_children = ${FPM_MAX_CHILDREN}
pm.start_servers = ${FPM_START_SERVERS}
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
EOF
cat >"/etc/${PHP}/conf.d/post_size.ini" <<EOF
upload_max_size = ${POSTSIZE}
post_max_size = ${POSTSIZE}
upload_max_filesize = ${POSTSIZE}
upload_tmp_dir = /tmp
EOF
;;
*) ;;
esac
cat >"/etc/nginx/custom.d/post_size.conf" <<EOF
client_max_body_size ${POSTSIZE};
EOF
# start php
case "${PHP}" in
"php7")

View File

@ -3,6 +3,7 @@
WEBROOT=/data/www
WEBDAV_PORT=${WEBDAV_PORT:-8080}
PHP=${PHP:-none}
POSTSIZE=${POSTSIZE:-256M}
USERNAME=${USERNAME:-theuser}
PUID=${PUID:-1000}
GROUPNAME=${GROUPNAME:-thegroup}
@ -36,11 +37,21 @@ pm.max_children = ${FPM_MAX_CHILDREN}
pm.start_servers = ${FPM_START_SERVERS}
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
EOF
cat >"/etc/${PHP}/conf.d/post_size.ini" <<EOF
upload_max_size = ${POSTSIZE}
post_max_size = ${POSTSIZE}
upload_max_filesize = ${POSTSIZE}
upload_tmp_dir = /tmp
EOF
;;
*) ;;
esac
cat >"/etc/nginx/custom.d/post_size.conf" <<EOF
client_max_body_size ${POSTSIZE};
EOF
# start php
case "${PHP}" in
"php84")