From 00a3032e7275521bcd7eaa2feb9a85956a13ef14 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:47:17 +0530 Subject: [PATCH] fix: caddy for large uploads (#1504) --- deploy/cli-install/Caddyfile | 57 +++++++++++++++------------ deploy/cli-install/docker-compose.yml | 2 +- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/deploy/cli-install/Caddyfile b/deploy/cli-install/Caddyfile index d0e8bf54fa..83e3571da3 100644 --- a/deploy/cli-install/Caddyfile +++ b/deploy/cli-install/Caddyfile @@ -1,34 +1,39 @@ (plane_proxy) { - request_body { - max_size {$FILE_SIZE_LIMIT} - } + request_body { + max_size {$FILE_SIZE_LIMIT} + } - reverse_proxy /spaces/* space:3000 - - reverse_proxy /god-mode/* admin:3000 - - reverse_proxy /api/* api:8000 - - reverse_proxy /auth/* api:8000 - - reverse_proxy /live/* live:3000 - - reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000 - - reverse_proxy /* web:3000 + reverse_proxy /spaces/* space:3000 + reverse_proxy /god-mode/* admin:3000 + reverse_proxy /api/* api:8000 + reverse_proxy /auth/* api:8000 + reverse_proxy /live/* live:3000 + reverse_proxy /{$BUCKET_NAME} plane-minio:9000 + reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000 + reverse_proxy /* web:3000 } { - email {$CERT_EMAIL:admin@example.com} - acme_ca {$CERT_ACME_CA} - {$CERT_ACME_DNS} - servers { - max_header_size 5MB - client_ip_headers X-Forwarded-For X-Real-IP - trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0} - } + email {$CERT_EMAIL:admin@example.com} + acme_ca {$CERT_ACME_CA} + {$CERT_ACME_DNS} + servers { + timeouts { + read_body 600s + read_header 30s + write 600s + idle 600s + } + max_header_size 25MB + client_ip_headers X-Forwarded-For X-Real-IP + trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0} + } + log { + output {$LOG_OUTPUT:stdout} + level {$LOG_LEVEL:INFO} + } } {$SITE_ADDRESS} { - import plane_proxy -} + import plane_proxy +} \ No newline at end of file diff --git a/deploy/cli-install/docker-compose.yml b/deploy/cli-install/docker-compose.yml index acf5715361..03a0e61c9f 100644 --- a/deploy/cli-install/docker-compose.yml +++ b/deploy/cli-install/docker-compose.yml @@ -35,7 +35,7 @@ x-app-env: &app-env - SECRET_KEY=${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5} # DATA STORE SETTINGS - USE_MINIO=${USE_MINIO:-1} - - AWS_REGION=${AWS_REGION:-""} + - AWS_REGION=${AWS_REGION:-} - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"access-key"} - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"secret-key"} - AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL:-http://plane-minio:9000}