Skip to content

Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.

fix(restore): increase upload max size

Miguel Ribeiroed7ccaf57e69
diff --git a/Dockerfile b/Dockerfile
index 95f4930..07040f3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,7 +34,8 @@ RUN dos2unix /etc/cron.d/cronjobs && \
chown -R www-data:www-data /var/www/html && \
chmod +x /var/www/html/startup.sh && \
echo 'pm.max_children = 15' >> /usr/local/etc/php-fpm.d/zz-docker.conf && \
- echo 'pm.max_requests = 500' >> /usr/local/etc/php-fpm.d/zz-docker.conf
+ echo 'pm.max_requests = 500' >> /usr/local/etc/php-fpm.d/zz-docker.conf && \
+ printf 'upload_max_filesize = 256M\npost_max_size = 256M\n' > /usr/local/etc/php/conf.d/wallos-uploads.ini
# Expose port 80 for Nginx
EXPOSE 80
diff --git a/nginx.conf b/nginx.conf
index b73123f..bc17617 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -21,6 +21,10 @@ http {
sendfile on;
keepalive_timeout 65;
+ # Database backups (with logos) can be tens of MB. The nginx default of 1M
+ # would reject a restore upload with 413 before PHP ever sees it.
+ client_max_body_size 256M;
+
server {
listen [::]:80 ipv6only=off;
server_name localhost;
diff --git a/nginx.default.conf b/nginx.default.conf
index 7f7e063..2112272 100644
--- a/nginx.default.conf
+++ b/nginx.default.conf
@@ -4,6 +4,10 @@ server {
root /var/www/html; # Change to your web root directory
+ # Database backups (with logos) can be tens of MB. Without this, a restore
+ # upload is rejected with 413 before PHP sees it.
+ client_max_body_size 256M;
+
location / {
try_files $uri $uri/ /index.php?$args;
}