Seafile Docker: Files larger 4GB

Hello guys :slight_smile:

I promise, thats my last problem :smiley: How do you guys setup your nginx inside the docker-container? I only want to change one paramater, but I cant because the container changes my seafile.nginx.conf after restarting.

I try to change the following: https://manual.seafile.com/deploy/deploy_with_nginx.html

Tip for uploading very large files (> 4GB): By default Nginx will buffer large request bodies in temp files. After the body is completely received, Nginx will send the body to the upstream server (seaf-server in our case). But it seems when the file size is very large, the buffering mechanism dosen’t work well. It may stop proxying the body in the middle. So if you want to support file uploads larger than 4GB, we suggest to install Nginx version >= 1.8.0 and add the following options to Nginx config file:

  location /seafhttp {
        ... ...
        proxy_request_buffering off;
    }

I tried to mount that file as read-only-volume but the container doesn’t start after that, complaining, that he cant write the file anymore (I think the autocreation tries this) - do you guys have some tips to change this? I dont want to run a nginx-container just to change one parameter inside the seafile-container. That seems a bit to much for just one change.

Thank you very much for your patience with me :slight_smile:

atomique

Hey.
Ich habe die gleiche Frage.
Kann ich die seafile.nginx.conf.template irgendwo ablegen, damit diese anstatt der Default im Docker Container verwendet wird?

Viele Grüße

Ich habe jetzt auch einen Ordner nginx unter
/opt/seafile-data/nginx
erstellt und dort meine Datei
seafile.nginx.conf
abgelegt.

Aber bei jedem Start mit dem Parameter:
docker run -d --name seafile
[…]
-v /opt/seafile-data/nginx:/etc/nginx/sites-enabled

Ist die Datei wieder auf default zurückgesetzt.

Kann da jemand weiterhelfen?

Der Grund für dies alles ist, dass ich keine größeren Dateien (400MB) über die Weboberfläche hochladen kann.

The easiest way to overwrite config files generated from templates and not present in /shared is to build a customized image derived from the one provided by Seafile.
My example:

# less Dockerfile
FROM docker.seadrive.org/seafileltd/seafile-pro:6.3.11

COPY templates /templates
COPY nginx.conf /etc/nginx/nginx.conf

With this and your modified files (templates/seafile.nginx.conf.template and nginx.conf in this example), just run ‘docker build .’ and you have your own image with your changes inside that otherwise behaves exactly like the original.

Hey himself85,

ich hatte auch etwas in der Art probiert, aber irgendwo im Image bzw. im Skript habe ich dann etwas gefunden, was das immer wieder überschreibt.

Ich habe bis jetzt auf den Upload großer Dateien über die WebUI verzichtet und dann den Client verwendet. Super nervig, aber dann doch irgendwann akzeptiert. Allgemein empfinde ich die Docker-Lösung als noch nicht so rund wie andere.

Ich werde die Tage einmal die Lösung von @mnbokaem testen! Diese sieht interessant aus!

@mnbokaem Thanks for that solution, I will give it a try!