Git Product home page Git Product logo

docker-seafile's People

Contributors

fmoledina avatar gronis avatar kouyk avatar martinml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-seafile's Issues

Container never finishes setup, 502 on port 8000

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

gunicorn.conf.py Permissions Prevent Container From Starting

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?

Cannot start using docker-compose

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)

Swag and Seafile how to configure

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

Update to seafile server 7.1.x

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.

Autosetup not working with mysql

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:

  1. Set the MODE environment variable to setup_sqlite - yes, even though I am using MySQL - and docker-compose up
  2. Set the MODE environment variable to setup_mysql and docker-compose up
  3. Remove the MODE environment variable and docker-compose up

Couple of questions to get started

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?

Seafile server 7.0.3, seahub started but connection refused returned on http get request

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.

su: warning: cannot change directory to /seafile: Permission denied

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

First run results in ModuleNotFoundError: No module named 'seaserv'

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.