Skip to content

Commit 93b55c1

Browse files
authored
Merge pull request #79 from heseya/feature/MPT-2801
Increased memory limit
2 parents 23398d5 + 10382b1 commit 93b55c1

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ FROM escolasoft/php:8.1-nginx
22
ADD . /var/www/html
33
RUN composer i
44
RUN chown -R www-data:www-data *
5+
6+
COPY ./docker/php/memory-limit.ini /usr/local/etc/php/conf.d/memory-limit.ini

docker/Dockerfile-dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ WORKDIR /usr/src/app
3030

3131
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
3232
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
33+
COPY ./php/memory-limit.ini /usr/local/etc/php/conf.d/memory-limit.ini
34+

docker/nginx/default.conf.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ server {
88
proxy_set_header X-Real-IP $remote_addr;
99
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1010
}
11+
12+
client_max_body_size 100M;
1113
}

docker/php/memory-limit.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
memory_limit = 512M
2+
upload_max_filesize = 100M
3+
post_max_size = 100M

tests/ViewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function testCantViewUserKey(): void
4747

4848
public function testVideoAsPartialContent(): void
4949
{
50+
$response = $this->send('GET', '/test/' . $this->fileVideo->name, [], ['Range' => 'bytes=0-999']);
5051
ob_start();
51-
$response = $this->send('GET', '/test/' . $this->fileVideo->name);
5252
$this->assertEquals(file_get_contents(__DIR__ . '/files/video.mp4'), $response->streamedContent());
5353

5454
$this->assertResponseStatus(206);

0 commit comments

Comments
 (0)