From 6ed8c36f2dc41a0f138f444b02497f986c3654f4 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Mon, 18 Nov 2024 10:23:08 -0600 Subject: [PATCH] Increase max upload size for GitLab Sometimes I upload artifacts that are pretty large. So this changes the limits in Nginx so that it will accept them. --- hosts/linode/git.nix | 1 + hosts/myself/container-git.nix | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hosts/linode/git.nix b/hosts/linode/git.nix index cc3e1b8..bee496a 100644 --- a/hosts/linode/git.nix +++ b/hosts/linode/git.nix @@ -12,6 +12,7 @@ in extraConfig = '' proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Ssl on; + client_max_body_size 100000m; ''; }; greg.proxies."registry.thehellings.com" = { diff --git a/hosts/myself/container-git.nix b/hosts/myself/container-git.nix index 928ffcf..79e9889 100644 --- a/hosts/myself/container-git.nix +++ b/hosts/myself/container-git.nix @@ -54,6 +54,7 @@ in extraConfig = '' proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Ssl on; + client_max_body_size 10000m; ''; }; in @@ -123,7 +124,7 @@ in extraConfig = { object_store = { enabled = true; - proxy_download = false; # Tell them to reach out to object storage themselves! + proxy_download = true; # Tell them to reach out to object storage themselves! connection = { provider = "AWS"; endpoint = "http://s3.thehellings.lan:9000"; @@ -171,11 +172,11 @@ in proxyPass = "http://127.0.0.1:5000/"; recommendedProxySettings = true; }; - extraConfig = builtins.concatStringsSep "\n" [ - "ssl_certificate /etc/certs/gitlab.shire-zebra.ts.net.crt ;" - "ssl_certificate_key /etc/certs/gitlab.shire-zebra.ts.net.key ;" - "client_max_body_size 250m;" - ]; + extraConfig = '' + ssl_certificate /etc/certs/gitlab.shire-zebra.ts.net.crt ; + ssl_certificate_key /etc/certs/gitlab.shire-zebra.ts.net.key ; + client_max_body_size 10000m ; + ''; }; # Fetch the SSL certificates for nginx to use