Merge pull request #443 from appwrite/nginx-upload
Dynamic Nginx max request size from ENV var
This commit is contained in:
commit
87045ae10e
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
Loading…
Reference in a new issue