1
0
Fork 0
mirror of synced 2024-05-13 17:22:38 +12:00

Dynamic nginx max request size

This commit is contained in:
Eldad Fux 2020-06-23 13:06:07 +03:00
parent 0abfa5e5fc
commit b42c99ea94
4 changed files with 4 additions and 4 deletions

View file

@ -130,13 +130,12 @@ RUN \
# Set Upload Limit (default to 100MB)
RUN echo "upload_max_filesize = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
RUN echo "post_max_size = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
RUN echo "env[TESTME] = your-secret-key" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
# Add logs file
RUN echo "" >> /var/log/appwrite.log
# Nginx Configuration (with self-signed ssl certificates)
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/nginx.conf.template /etc/nginx/nginx.conf.template
COPY ./docker/ssl/cert.pem /etc/nginx/ssl/cert.pem
COPY ./docker/ssl/key.pem /etc/nginx/ssl/key.pem

View file

@ -4,6 +4,8 @@ export PHP_VERSION=$PHP_VERSION
chown -Rf www-data.www-data /usr/share/nginx/html/
sed 's/%_APP_STORAGE_LIMIT%/'$_APP_STORAGE_LIMIT'/g' /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
# Function to update the fpm configuration to make the service environment variables available
function setEnvironmentVariable() {
if [ -z "$2" ]; then

View file

@ -54,7 +54,6 @@ services:
- ./docs:/usr/share/nginx/html/docs
- ./public:/usr/share/nginx/html/public
- ./src:/usr/share/nginx/html/src
- ./docker/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- mariadb
- redis

View file

@ -16,7 +16,7 @@ http {
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 10M;
client_max_body_size %_APP_STORAGE_LIMIT%;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;