Hi!
I am currently trying to set up Seafile on my server (domain.tld). I am using docker-compose with the following configuration:
version: '3.3'
services:
nginx:
container_name: nginx-proxy
image: nginx
ports:
- '80:80'
- '443:443'
volumes:
- '/data/nginx:/etc/nginx'
- '/data/letsencrypt:/etc/letsencrypt'
- '/data/webroot:/usr/share/nginx/html'
restart: always
mysql:
container_name: mysql
image: mariadb:10.5
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_LOG_CONSOLE=true
volumes:
- /data/mysql:/var/lib/mysql
memcached:
image: memcached:1.5.6
container_name: memcached
entrypoint: memcached -m 256
seafile:
container_name: seafile
image: seafileltd/seafile-mc:latest
volumes:
- /data/seafile:/shared
environment:
- DB_HOST=mysql
- DB_ROOT_PASSWD=password
- TIME_ZONE=Europe/Berlin
- SEAFILE_ADMIN_EMAIL=mailaddress
- SEAFILE_ADMIN_PASSWORD=password
- SEAFILE_SERVER_LETSENCRYPT=false
depends_on:
- mysql
- memcached
There are also services for portainer, gitea and syncthing, which I left out.
I am using nginx as a reverse proxy to put each service into its own virtual subdirectory:
server {
server_name domain.tld;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
root /usr/share/nginx/html;
index index.html index.htm;
location /portainer/ {
proxy_pass hxxp://portainer:9000/;
}
location /syncthing/ {
proxy_pass hxxp://syncthing:8384/;
}
location /gitea/ {
proxy_pass hxxp://gitea:3000/;
}
location /seafile/ {
proxy_pass hxxp://seafile:80/;
}
location /seafhttp/ {
proxy_pass hxxp://seafile:80/seafhttp/;
}
}
server {
listen 80;
server_name domain.tld;
location / {
return 301 hxxps://$host$request_uri;
}
}
(I replaced ‘http’ with ‘hxxp’, because I am not allowed to post links.)
This works fine for my other containers but I’m having trouble with Seafile.
I modified the SERVICE_URL in ccnet.conf:
SERVICE_URL = hxxps://domain.tld/seafile/
And added the following to seahub_settings.py:
FILE_SERVER_ROOT = "hxxps://domain.tld/seafhttp"
SERVE_STATIC = False
MEDIA_URL = '/seafile/media/'
COMPRESS_URL = MEDIA_URL
STATIC_URL = MEDIA_URL + 'assets/'
SITE_ROOT = '/seafile/'
LOGIN_URL = '/seafile/accounts/login/'
But when accessing seafile through hxxps://domain.tld/seafile I get the following error message:
Sorry, but the requested page could not be found.
And I am seeing repeated error messages in seahub.log saying:
[WARNING] django.request:228 log_response Not Found: /
What am I doing wrong?