gronis / docker-seafile Goto Github PK
View Code? Open in Web Editor NEWA seafile server docker container
License: MIT License
A seafile server docker container
License: MIT License
Navigating to the url seafile is reverse proxied to results in 502. I keep getting this in the logs after docker-compose up -d
seafile-0 | /tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile-0 | /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile-0 |
seafile-0 | seafile server not running yet
seafile-0 | Done.
seafile-0 | Fixing gunicorn config.
seafile-0 | sed: can't read /seafile/conf/gunicorn.conf: No such file or directory
seafile-0 | cat: /seafile/version: No such file or directory
seafile-0 | /usr/local/bin/seafile-entrypoint.sh: line 7: 7.0.5: command not found
seafile-0 | /tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile-0 | /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile-0 |
seafile-0 | Seahub is not running
seafile-0 | Done.
My docker-compose.yml:
version: "3"
networks:
frontend:
sf:
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:0.3.6
container_name: caddy-0
command: -email [email protected] -agree=true -log stdout
networks:
- frontend
- backend
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./caddy:/root/.caddy
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
seafile:
image: gronis/seafile:latest
container_name: seafile-0
networks:
- frontend
- sf
expose:
# seahub
- 8000
# seafhttp
- 8082
restart: always
volumes:
- ./seafile/data:/seafile:rw
- /etc/localtime:/etc/localtime:ro
environment:
- SEAFILE_NAME=SEafile
- SEAFILE_ADDRESS=sea.example.org
- MYSQL_SERVER=seafile-db
- MYSQL_USER=seafile
- MYSQL_USER_PASSWORD=SomePassword
- MYSQL_ROOT_PASSWORD=OtherPassword
- [email protected]
- SEAFILE_ADMIN_PW=aPassword
depends_on:
- seafile-db
labels:
- caddy_0.address=sea.example.com
- caddy_0.targetport=8000
- caddy_0.proxy.transparent=
- caddy_1.address=sea.example.com/seafhttp
- caddy_1.targetport=8082
- caddy_1.proxy.transparent=
- caddy_1.proxy.without=/seafhttp
seafile-db:
image: mariadb
container_name: seafile-db
networks:
- sf
restart: always
volumes:
- ./seafile/db:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_LOG_CONSOLE=true
- MYSQL_ROOT_PASSWORD=OtherPassword
When starting the container I get the following error in the logs:
Starting seahub at port 8000 ...
Failed to read config file: /opt/haiwen/conf/gunicorn.conf.py
Traceback (most recent call last):
File "/opt/haiwen/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/base.py", line 111, in get_config_from_filename
spec.loader.exec_module(mod)
File "", line 724, in exec_module
File "", line 859, in get_code
File "", line 916, in get_data
PermissionError: [Errno 13] Permission denied: '/opt/haiwen/conf/gunicorn.conf.py'
Error:Seahub failed to start.
This is the permission of the file in the Docker volume:
root@dockerhost:/media/data/files/conf# ll
total 7
drwxrwxrwx 1 seauser seauser 496 Feb 28 09:41 ./
drwxrwxrwx 1 seauser seauser 4096 Feb 28 09:37 ../
-rwxrwxrwx 1 seauser seauser 10 Feb 28 09:37 ccnet.conf*
lrwxrwxrwx 1 seauser seauser 13 Feb 28 09:41 conf -> /seafile/conf
---------- 1 seauser seauser 295 Feb 28 09:41 gunicorn.conf.py
-rwxrwxrwx 1 seauser seauser 52 Feb 28 09:37 seafdav.conf*
-rwxrwxrwx 1 seauser seauser 23 Feb 28 09:37 seafile.conf*
-rwxrwxrwx 1 seauser seauser 90 Feb 28 09:37 seahub_settings.py*
Changing the permissions in Docker volume has no effect. Changing the permissions on the linked folder as Seahub tries to start does work:
docker container exec seafile chmod -R 777 /opt/haiwen/conf/gunicorn.conf.py
Seahub will then start and I can access the Seafile web interface. However, if the container restarts then the permission issue returns.
Is it possible to fix the permissions on the gunicorn.conf.py file?
WARNING: The asVdNk52 variable is not set. Defaulting to a blank string.
Network nginx-proxy is external, skipping
WARNING: The asVdNk52 variable is not set. Defaulting to a blank string.
Creating SeafileDB ...
Creating SeafileDB ... done
Creating SeafileServer ...
Creating SeafileServer ... done
cat: /seafile/version: No such file or directory
/usr/local/bin/seafile-entrypoint.sh: line 7: 6.2.5: command not found
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Seahub is not running
Done.
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile server not running yet
Done.
/usr/local/bin/seafile-entrypoint.sh: line 25: [: !=: unary operator expected
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Error: there is no ccnet config directory.
Have you run setup-seafile.sh before this?
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Error: there is no conf/ directory.
Have you run setup-seafile.sh before this?
setup_mysql
2018/05/24 02:30:56 Waiting for: tcp://seafile-db:3306
2018/05/24 02:30:56 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:30:57 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:30:58 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:30:59 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:00 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:01 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:02 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:03 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:04 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:05 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:06 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:07 Problem with dial: dial tcp 172.18.0.14:3306: getsockopt: connection refused. Sleeping 1s
2018/05/24 02:31:08 Connected to tcp://seafile-db:3306
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
bash: F: command not found
bash: Fy: command not found
bash: DRyGQyy^ez*NM: command not found
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Hello
I'm using Swag and Cloudflare Tunnel for me applications which are on my home server. It's very nice and secure with Cloudflare.
I want to had Seafile on my home server, to replace Nextcloud. I prefer Seafile than Nextcloud (more lite on my server).
Seafile is running well on my home server in "local" via ip adress, I want to give access via "Internet" on my seafile.
Swag and other applications as Nextcloud work very fine via Internet.
My question is how I connect Seafile and Swag. In Swag there is a system of proxy-conf for every application but nothing for Seafile.
I made some tests with the "proxy conf template" but nothing work.
I such some one who have the solution for "proxy-conf seafile"
Many thanks for your help
Fred
In order to update to seafile server above version 7.0.5 (7.1.x and higher), python 3 needs to be used instead of python2.
docker-compose file:
version: "3.7"
services:
mysql-seafile:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- internal
volumes:
- type: volume
source: mysqldata-seafile
target: /var/lib/mysql
seafile:
image: gronis/seafile
restart: always
networks:
- web
- internal
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:cloud.sovarto.com"
- "traefik.port=8000"
- "traefik.protocol=http"
- "traefik.docker.network=web"
environment:
SEAFILE_NAME: "Sovarto Cloud"
SEAFILE_ADDRESS: cloud.sovarto.com
SEAFILE_ADMIN: [email protected]
SEAFILE_ADMIN_PW: ${SEAFILE_ADMIN_PASSWORD}
MYSQL_SERVER: mysql-seafile
MYSQL_USER: seafile
MYSQL_USER_PASSWD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWD: ${DB_PASSWORD}
volumes:
- type: volume
source: seafile-data
target: /seafile
ports:
- "8082:8082"
depends_on:
- mysql-seafile
volumes:
mysqldata-seafile:
seafile-data:
When I start it, I get the following output:
seafile_1 | /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile_1 |
seafile_1 | seafile server not running yet
seafile_1 | Done.
seafile_1 | /tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile_1 | /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile_1 |
seafile_1 | Error: there is no ccnet config directory.
seafile_1 | Have you run setup-seafile.sh before this?
seafile_1 |
seafile_1 | /tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile_1 | /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile_1 |
seafile_1 | Error: there is no conf/ directory.
seafile_1 | Have you run setup-seafile.sh before this?
seafile_1 |
seafile_1 | setup_mysql
seafile_1 | 2019/04/28 06:44:54 Waiting for: tcp://mysql-seafile:3306
seafile_1 | 2019/04/28 06:44:54 Connected to tcp://mysql-seafile:3306
To make it work, I have to perform the following steps:
MODE
environment variable to setup_sqlite
- yes, even though I am using MySQL - and docker-compose up
MODE
environment variable to setup_mysql
and docker-compose up
MODE
environment variable and docker-compose up
As a noob running Ubuntu on an Intel based home server with several services running via Docker (Compose), I really want to use Seafile. But I am not sure which docker version to pick.
Yours seems straightforward for a beginner like me, you even provide a full docker-compose.yml example with reverse proxy, SSL and MariaDB!
Do you recommend MariaDB for speed and stability over SQLite?
Haiwen's version includes Memcached. I believe that can greatly speed up Seafile and I have 32GB ECC Ram so it would be of good use. Is your setup capable of using it with Memcached?
When I upgraded to 7.0.3 on my personal server, I couldn't access seahub. For some reason my previous "bind" variable in /seafile/conf/gunicorn.conf
was configured with:
bind = "127.0.0.1:8000"
and I had to change to the following to get it working:
bind = "0.0.0.0:8000"
Not sure why this worked before, but is not working now. Maybe I got a new version of gunicorn with different behavior in this release.
See https://forum.seafile.com/t/seafile-and-seahub-start-but-nothing-will-connect-after-upgrade/9204 for more details.
So, if you read this and get the same problem, try this and see if it works.
When running initial setup, I get bunch of:
su: warning: cannot change directory to /seafile: Permission denied
-bash: /seafile/.bash_profile: Permission denied
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
the only way to finish setup is to remove su -
and run everything as root
Running this command:
docker run --rm -e "SEAFILE_NAME=Seafile" -e "SEAFILE_ADDRESS=seafile.example.com" -e "[email protected]" -e "SEAFILE_ADMIN_PW=SuperSecretPassword" gronis/seafile
produces the following log:
Python 3.9.2
ldd (Debian GLIBC 2.31-13+deb11u2) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
ls: cannot access '/opt/haiwen/ccnet': No such file or directory
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Seahub is not running
Done.
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
seafile server not running yet
Done.
Copying /opt/haiwen/seafile-server-9.0.9/seahub/media/avatars => /seafile/seahub-data/avatars
Dropping /opt/haiwen/seafile-server-9.0.9/seahub/media/avatars
Linking /opt/haiwen/seahub-data => /seafile/seahub-data
Linking /opt/haiwen/seafile-server-9.0.9/seahub/media/avatars => /seafile/seahub-data/avatars
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Error: there is no conf/ directory.
Have you run setup-seafile.sh before this?
setup_sqlite
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Checking packages needed by seafile ...
Checking python on this machine ...
Find python: python3
Checking python module: python-sqlite3 ... Done.
Checking for sqlite3 ...Done.
Checking Done.
This is your config information:
server name: �[33mSeafile�[m
server ip/domain: �[33mseafile.example.com�[m
seafile data dir: �[33m/opt/haiwen/seafile-data�[m
fileserver port: �[33m8082�[m
Generating ccnet configuration in /opt/haiwen/ccnet...
Generating seafile configuration in /opt/haiwen/seafile-data ...
Creating database now, it may take one minute, please wait...
/seafile
Done.
creating seafile-server-latest symbolic link ... done
-----------------------------------------------------------------
Your seafile server configuration has been completed successfully.
-----------------------------------------------------------------
run seafile server: ./seafile.sh { start | stop | restart }
run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
-----------------------------------------------------------------
If the server is behind a firewall, remember to open these tcp ports:
-----------------------------------------------------------------
port of seafile fileserver: 8082
port of seahub: 8000
When problems occur, refer to
https://download.seafile.com/published/seafile-manual/home.md
for more information.
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Starting seafile server, please wait ...
** Message: 09:03:36.204: seafile-controller.c(621): No seafevents.
Seafile server started
Done.
/tmp/seafile.env: line 2: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Traceback (most recent call last):
File "/opt/haiwen/seafile-server-9.0.9/check_init_admin.py", line 19, in <module>
from seaserv import ccnet_api
ModuleNotFoundError: No module named 'seaserv'
I've tried using the older 9.0.* versions, but they all throw the same error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.