forked from github/plane
fix: file upload size limit (#1218)
This commit is contained in:
parent
fae9d8cdc1
commit
705371eaf3
@ -109,8 +109,8 @@ services:
|
||||
volumes:
|
||||
- uploads:/export
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||
command: server /export --console-address ":9090"
|
||||
|
||||
createbuckets:
|
||||
@ -127,13 +127,16 @@ services:
|
||||
|
||||
# Comment this if you already have a reverse proxy running
|
||||
plane-proxy:
|
||||
container_name: planeproxy
|
||||
image: makeplane/plane-proxy:latest
|
||||
ports:
|
||||
- ${NGINX_PORT}:80
|
||||
depends_on:
|
||||
- plane-web
|
||||
- plane-api
|
||||
container_name: planeproxy
|
||||
image: makeplane/plane-proxy:latest
|
||||
ports:
|
||||
- ${NGINX_PORT}:80
|
||||
environment:
|
||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||
depends_on:
|
||||
- plane-web
|
||||
- plane-api
|
||||
|
||||
|
||||
volumes:
|
||||
|
@ -4,10 +4,10 @@ services:
|
||||
plane-web:
|
||||
container_name: planefrontend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./apps/app/Dockerfile.web
|
||||
args:
|
||||
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
|
||||
context: .
|
||||
dockerfile: ./apps/app/Dockerfile.web
|
||||
args:
|
||||
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
|
||||
restart: always
|
||||
command: [ "/usr/local/bin/start.sh" ]
|
||||
environment:
|
||||
@ -24,8 +24,8 @@ services:
|
||||
plane-api:
|
||||
container_name: planebackend
|
||||
build:
|
||||
context: ./apiserver
|
||||
dockerfile: Dockerfile.api
|
||||
context: ./apiserver
|
||||
dockerfile: Dockerfile.api
|
||||
restart: always
|
||||
command: ./bin/takeoff
|
||||
environment:
|
||||
@ -61,8 +61,8 @@ services:
|
||||
plane-worker:
|
||||
container_name: planebgworker
|
||||
build:
|
||||
context: ./apiserver
|
||||
dockerfile: Dockerfile.api
|
||||
context: ./apiserver
|
||||
dockerfile: Dockerfile.api
|
||||
restart: always
|
||||
command: ./bin/worker
|
||||
environment:
|
||||
@ -88,8 +88,8 @@ services:
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
||||
GPT_ENGINE: ${GPT_ENGINE}
|
||||
SECRET_KEY: ${SECRET_KEY}
|
||||
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
|
||||
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
|
||||
DEFAULT_EMAIL: ${DEFAULT_EMAIL:-captain@plane.so}
|
||||
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD:-password123}
|
||||
USE_MINIO: ${USE_MINIO}
|
||||
depends_on:
|
||||
- plane-api
|
||||
@ -130,27 +130,24 @@ services:
|
||||
createbuckets:
|
||||
image: minio/mc
|
||||
entrypoint: >
|
||||
/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;
|
||||
"
|
||||
/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; "
|
||||
depends_on:
|
||||
- plane-minio
|
||||
|
||||
plane-proxy:
|
||||
container_name: planeproxy
|
||||
build:
|
||||
context: ./nginx
|
||||
dockerfile: Dockerfile
|
||||
context: ./nginx
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
ports:
|
||||
- ${NGINX_PORT}:80
|
||||
environment:
|
||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||
depends_on:
|
||||
- plane-web
|
||||
- plane-api
|
||||
|
||||
- plane-web
|
||||
- plane-api
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
@ -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
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;
|
||||
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/;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user