How to use official Docker with different Proxy

Hello guys,
I’m trying to deploy the official docker image (https://github.com/haiwen/seafile-docker) with an different nginx proxy (https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/) bc I want to host different things on my server… I’m desperate because I can’t get it to work…
Maybe some of you guys had the same problem an can help me out!
Thanks in advance

Hi,

first it would good to provide some information about your setup. Which version of Seafile do you use?

Does your seafile server works at the 8000 port?

My setup is the official seafile docker container and seperatly the nginx server in the letsencrypt docker container.

I just added this to the nginx configuration server

server {
listen 443 ssl http2;
server_name foo.bar.com;

root /config/www;
index index.html index.htm index.php;


# add_header Front-End-Https on;

client_max_body_size 0;

location / {
    proxy_pass http://10.0.0.4:8000/;
}

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://10.0.0.04:8082;
    client_max_body_size 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;
    proxy_request_buffering off;
}

}

you have to modify the domain and ip address. I hope this helps.

Hey, yeah thanks for the reply! I’ll give it a try later, but meanwhile do you have your commands for deploying the container? Because I’m not sure how to deploy it without starting nginx and LE from the seafile docker…
And actually where did you add the configuration?..

I’m using the latest docker version of seafile so 6.2.2 if I’m not wrong on a VPS with docker version 17.11.0-ce

Sorry for asking so many questions - probably stupid ones - but I’m really new to docker…^^

Okay, I got it working, but, i can’t upload any files…

So just for everybody else who’s interested in it - thats how i build my containers so far

docker network create seafile

#SEAFILE
docker run -d
–name seafile
-h seafile
-v /opt/seafile/shared:/shared
-v /opt/seafile/shared/logs/var-log:/var/log
-v /opt/seafile/shared/db:/var/lib/mysql
-v /opt/seafile/shared/.bash_history:/root/.bash_history
–network=seafile
local_seafile/server:latest

#NGINX#
docker run -d
–restart always
–name seafile-nginx
-v /srv/seafile/nginx:/etc/nginx/conf.d:ro
–volumes-from seafile
–network=seafile
–link seafile:seafile
-e “VIRTUAL_PORT=8082”
-e “VIRTUAL_HOST=c.domain.de
-e “LETSENCRYPT_HOST=c.domain.de
-e "LETSENCRYPT_EMAIL=email@email.de"
nginx

docker network connect web seafile-nginx

Okay so this way to deploy works fine, I just had to change FILE_SERVER_ROOT and HTTP_SERVER in admin ui to the URL given in seahub_settings.py.
BUT i can’t sync my libraries from any client… I just get

Bad response code for PUT 413

and

libcurl failed to PUT … Operation was aborted by an application callback.

Which is represented through “Error occured in upload” in my Client.
Someone has an idea what I can do?

Did you find a solution?

Well yeah kinda, it’s sketchy but it works. The thing is, I don’t quite remember how I did it…