Some stuff came up, so I am only just now getting back to testing the new version 12 with docker. I might try the non-docker because of all the problems the docker version is causing. Like for example, OAUTH is broken and it doesn’t seem like anything is being logged relating to that. Still troubleshooting things.
And that brings us to my first question, is there a docker version without nginx in the image? I figured out how to forwarded the ports that my existing nginx is already configured to talk to, but I haven’t found the way to just leave nginx out of the container completely in a way that won’t be undone by future releases.
BTW, is there a reason the database names were changed? They used to be “seafile_db” but now “seafile-db”. That’s likely to trip people up who aren’t looking real close. I don’t see a warning in the admin guide section on moving from non-docker deployments, nor in the Upgrade notes for 12.0.
The default should be seafile_db. How do you find the default is “seafile-db”?
Sorry, I got that wrong. The default is “seafile_db”. I can’t find any evidence that it was ever anything different, except that my database is seafile-db. I assumed that was the default because I can’t think of why I would have changed it.
I didn’t make any mention of it in my notes for this server back in 2015 when I migrated from an older hardware server into a VM, or even a year or so before that when I migrated from sqlite to mysql. So I have no idea why mine has the “-” instead of the “_”. I am also a bit surprised that I never noticed that I wasn’t using the default names before.
I will have to check if the seafile at work is -db or _db now, but either way it’s clear that this isn’t something new, and is probably something I did to myself. Sorry.
Out of curiosity, do you use a bare metal reverse proxy? I wanted to do a similar setup with Caddy on bare metal while forwarding 8080 and 8082 from the container but I couldn’t open any file on seahub. If you also use Caddy I would be happy to see your configuration.
Otherwise if you don’t want nginx in the container the only option is to build it yourself as far as I know.
It’s not really bare metal, it is nginx in its own VM. But it is also the reverse proxy for several other programs on other subdomains, and is part of the OAUTH authentication, so I would rather not change it any more than I have to. I am just testing with seafile 12, but so far having Nginx → Caddy → Nginx (in the container) → Seafile has completely broken OAUTH and made troubleshooting hard (have to check several logs, there’s lots more places to put wireshark, etc).
So I’ve removed the Caddy docker, and I’ve tried to bypass the nginx in the docker. I have been able to upload files through seahub, but downloading gives either 403 or 404 errors, so there’s clearly still some work I still need to do there. I have some ideas to try tomorrow, and if I crack it I will come back here to tell you what worked for me.
I found a solution, but one that brings up more questions. After you have started up the container for the first time, find the location where the conf files are stored. I think the default is /opt/seafile-data/seafile/seafile/conf/. Anyway, go there and edit the seahub.conf file, and add a line like this:
ALLOWED_HOSTS = ['.my_domain.com','192.168.69.50','127.0.0.1']
Then restart the docker.
I think you can do the full name (like seafile.my_domain.com), or just the domain without the subdomain (like “.my_domain.com”).
The 192.168.69.50 there is just the IP of my seafile VM, put your IP there (not the docker IP, but the real IP of the machine hosting the docker container). Probably don’t need it once everything is working and you always go to your seafile by name. But when troubleshooting it can be handy to skip the reverse proxy (or at least one of them) to see if that’s the layer causing a problem.
And the part that actually fixed it for me was the ‘127.0.0.1’. I don’t know if this breaks CSRF, that will take some more testing in the future, but it at least got the downloads to work again.