diff --git a/Dockerfile b/Dockerfile index b638af7f..b4750b73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,13 @@ RUN apk add --no-cache \ # Install PHP extensions RUN docker-php-ext-install pdo pdo_pgsql pgsql zip gd +# Configure PHP for large file uploads +RUN echo "upload_max_filesize = 550M" >> /usr/local/etc/php/conf.d/uploads.ini && \ + echo "post_max_size = 550M" >> /usr/local/etc/php/conf.d/uploads.ini && \ + echo "max_execution_time = 300" >> /usr/local/etc/php/conf.d/uploads.ini && \ + echo "max_input_time = 300" >> /usr/local/etc/php/conf.d/uploads.ini && \ + echo "memory_limit = 512M" >> /usr/local/etc/php/conf.d/uploads.ini + # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer diff --git a/README.md b/README.md index 50473046..b2bc0fea 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ This website provides public access to court documents from an ongoing lawsuit i - Delete entries (cascades to associated documents) - View entry details - **Document Management**: - - Upload PDF documents (10MB max) + - Upload PDF documents (500MB max) - UUID-based file naming for security - Multiple documents per docket entry - Delete documents diff --git a/app/Http/Controllers/Admin/DocumentController.php b/app/Http/Controllers/Admin/DocumentController.php index 6eea8223..76087e78 100644 --- a/app/Http/Controllers/Admin/DocumentController.php +++ b/app/Http/Controllers/Admin/DocumentController.php @@ -18,7 +18,7 @@ class DocumentController extends Controller public function store(Request $request, DocketEntry $docketEntry): RedirectResponse { $validated = $request->validate([ - 'file' => 'required|file|mimes:pdf|max:10240', // 10MB max + 'file' => 'required|file|mimes:pdf|max:512000', // 500MB max 'title' => 'required|string|max:255', 'summary' => 'nullable|string', ]); diff --git a/docker/nginx.conf b/docker/nginx.conf index a7ce7b4d..63ac3416 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -22,7 +22,7 @@ http { tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; - client_max_body_size 20M; + client_max_body_size 550M; gzip on; gzip_vary on;