fix: file upload size limit (#1218)

This commit is contained in:
pablohashescobar 2023-06-06 19:15:42 +05:30 committed by GitHub
parent fae9d8cdc1
commit 705371eaf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 33 deletions

View file

@ -1,4 +1,10 @@
FROM nginx:1.21-alpine
FROM nginx:1.25.0-alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf.template /etc/nginx/nginx.conf.template
COPY ./env.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
# Update all environment variables
CMD ["/docker-entrypoint.sh"]

4
nginx/env.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
exec nginx -g 'daemon off;'

View file

@ -8,6 +8,9 @@ server {
listen 80;
root /www/data/;
access_log /var/log/nginx/access.log;
client_max_body_size ${FILE_SIZE_LIMIT};
location / {
proxy_pass http://planefrontend:3000/;
}
@ -16,7 +19,7 @@ server {
proxy_pass http://planebackend:8000/api/;
}
location /uploads/ {
location /${BUCKET_NAME}/ {
proxy_pass http://plane-minio:9000/uploads/;
}
}