forked from github/plane
fix: file upload size limit (#1218)
This commit is contained in:
parent
fae9d8cdc1
commit
705371eaf3
@ -131,6 +131,9 @@ services:
|
|||||||
image: makeplane/plane-proxy:latest
|
image: makeplane/plane-proxy:latest
|
||||||
ports:
|
ports:
|
||||||
- ${NGINX_PORT}:80
|
- ${NGINX_PORT}:80
|
||||||
|
environment:
|
||||||
|
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||||
|
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-web
|
- plane-web
|
||||||
- plane-api
|
- plane-api
|
||||||
|
@ -88,8 +88,8 @@ services:
|
|||||||
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
||||||
GPT_ENGINE: ${GPT_ENGINE}
|
GPT_ENGINE: ${GPT_ENGINE}
|
||||||
SECRET_KEY: ${SECRET_KEY}
|
SECRET_KEY: ${SECRET_KEY}
|
||||||
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
|
DEFAULT_EMAIL: ${DEFAULT_EMAIL:-captain@plane.so}
|
||||||
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
|
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD:-password123}
|
||||||
USE_MINIO: ${USE_MINIO}
|
USE_MINIO: ${USE_MINIO}
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-api
|
- plane-api
|
||||||
@ -130,12 +130,7 @@ services:
|
|||||||
createbuckets:
|
createbuckets:
|
||||||
image: minio/mc
|
image: minio/mc
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
/bin/sh -c "
|
/bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; "
|
||||||
/usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY;
|
|
||||||
/usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME;
|
|
||||||
/usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME;
|
|
||||||
exit 0;
|
|
||||||
"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-minio
|
- plane-minio
|
||||||
|
|
||||||
@ -147,11 +142,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- ${NGINX_PORT}:80
|
- ${NGINX_PORT}:80
|
||||||
|
environment:
|
||||||
|
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||||
|
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-web
|
- plane-web
|
||||||
- plane-api
|
- plane-api
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
redisdata:
|
redisdata:
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
FROM nginx:1.21-alpine
|
FROM nginx:1.25.0-alpine
|
||||||
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
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
4
nginx/env.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||||
|
exec nginx -g 'daemon off;'
|
@ -8,6 +8,9 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
root /www/data/;
|
root /www/data/;
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
|
client_max_body_size ${FILE_SIZE_LIMIT};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://planefrontend:3000/;
|
proxy_pass http://planefrontend:3000/;
|
||||||
}
|
}
|
||||||
@ -16,7 +19,7 @@ server {
|
|||||||
proxy_pass http://planebackend:8000/api/;
|
proxy_pass http://planebackend:8000/api/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /uploads/ {
|
location /${BUCKET_NAME}/ {
|
||||||
proxy_pass http://plane-minio:9000/uploads/;
|
proxy_pass http://plane-minio:9000/uploads/;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user