Git Product home page Git Product logo

seafile-containerized's People

Contributors

bestlibre avatar bugwelle avatar cuihaikuo avatar dervomsee avatar fakuivan avatar freeplant avatar ggogel avatar kklein33 avatar libeanim avatar lins05 avatar maxneuds avatar moritzschaefer avatar renfeipeng avatar renovate-bot avatar renovate[bot] avatar shoeper avatar skywalkerspace avatar stevesbrain avatar wenbinhou avatar yatesco 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  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  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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seafile-containerized's Issues

problems with TIME_ZONE on seahub container

Hi,

If TIME_ZONE is set in docker-compose environment parameters the script https://github.com/ggogel/seafile-containerized/blob/master/seahub/scripts/create_data_links.sh at container startup fails with invalid time zone error.
Taking a look inside the failed but running seahub container, I can see that there is no 'zoneinfo' folder where the script is checking for if the named zone exists:
ls: /usr/share/zoneinfo/*: No such file or directory

I finally found a solution that works:
I mounted the zoneinfo folder from the host inside the seahub container read only:

  seahub:
    image: ggogel/seahub
    container_name: seahub
    restart: unless-stopped
    volumes:
      - seafile-data:/shared
      - seahub-avatars:/shared/seafile/seahub-data/avatars
      - seahub-custom:/shared/seafile/seahub-data/custom
      - /usr/share/zoneinfo:/usr/share/zoneinfo:ro
    environment:
      - SEAFILE_ADMIN_EMAIL=
      - SEAFILE_ADMIN_PASSWORD=
      - TIME_ZONE=Europe/Berlin

After that and a container rebuild, seahub container logs have the correct time. :)

Seafile doesn't come up after rebuilding the images today

Hi,
I rebuild my images today and after that it seems like seahub isn't coming up.
(I build the images myself, with this repo here and don't use the docker hub images.)

Caddy gets timeout requesting 172.25.0.6:8000 and 172.25.0.5:8082. So seahub and seafhttp? are not up.
The only curios thing I can really see in the logs is: seahub_1 | Error happened during creating seafile admin.

Perhaps some Python dependency got updated and broke something?
Can someone confirm the same behavior?

Support for FUSE extension

Hi,
Seafile supports a FUSE extension for browsing the server as if it were a normal filesystem. It looks like it is possible to trigger this from within Docker, but it requires manually starting it up from a container shell. It would be great if the image could be configured to automatically start the FUSE process and attach it to a bind-mounted directory.

Seafile V 11.0.2 "sluggish"

Morning,

Just trying to figure out if there is anything I can do or check...

As long as I have used Seafile in a Container on Unraid I have always appreciated it's "snapiness" to navigate through files and load/open them in comparison to Nextcloud and etc.

After recently upgrading Seafile to V11.0.2 I have noticed a general "sluggishness" and "stutter" navigating through files that was never present before. I was mucking about doing the bypass for the CSRF issue until I can figure out how to FIX the CSRF issue correctly; could speed and sluggishness be related to that? Anyone else experiencing a new found "stutter"? Is there anything else I can be advised to check?

Thanks!

Communication problems between containers

I tried to sync a library between clients but I'm getting the following errors:

image

(the gui reports "server error")

seafile.log shows these repeated lines:

[04/18/23 12:00:47] Transfer repo 'ee994f7a': ('normal', 'check') --> ('normal', 'commit')
[04/18/23 12:00:47] Transfer repo 'ee994f7a': ('normal', 'commit') --> ('normal', 'fs')
[04/18/23 12:00:47] Transfer repo 'ee994f7a': ('normal', 'fs') --> ('normal', 'data')
[04/18/23 12:00:47] Bad response code for GET http://172.22.172.137/seafhttp/repo/ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9/block/8b36fe37afd9d07a3c58f6c7ea0945a4ccce9077: 500.
[04/18/23 12:00:47] Transfer failed.
[04/18/23 12:00:47] libcurl failed to GET http://172.22.172.137/seafhttp/repo/ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9/block/a51917a0349d6fe44bedc272e269fcee6ac41fff: Failed writing received data to disk/application.
[04/18/23 12:00:47] Transfer failed.
[04/18/23 12:00:47] libcurl failed to GET http://172.22.172.137/seafhttp/repo/ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9/block/4bfef7d920f0e7f184f132eecfd7220fbfa87f7f: Failed writing received data to disk/application.
[04/18/23 12:00:47] Transfer failed.
[04/18/23 12:00:47] libcurl failed to GET http://172.22.172.137/seafhttp/repo/ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9/block/76c6de1c0ea6e4ce4c66959ea930ae2b45c182f3: Failed writing received data to disk/application.
[04/18/23 12:00:47] Transfer failed.
[04/18/23 12:00:47] Transfer repo 'ee994f7a': ('normal', 'data') --> ('error', 'finished')
[04/18/23 12:00:47] Repo 'Trabajos ingeniería' sync state transition from downloading to 'error': 'Server error'.

docker compose logs shows that there's apparently some communication errors between the different containers:

seafile-db-1              | 2023-04-18 14:51:56 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'root' host: '172.20.0.3' (Got an error reading communication packets)
seafile-db-1              | 2023-04-18 14:51:56 4 [Warning] Aborted connection 4 to db: 'ccnet_db' user: 'seafile' host: '172.20.0.3' (Got an error reading communication packets)
seafile-db-1              | 2023-04-18 14:51:56 5 [Warning] Aborted connection 5 to db: 'seafile_db' user: 'seafile' host: '172.20.0.3' (Got an error reading communication packets)
seafile-db-1              | 2023-04-18 14:51:56 6 [Warning] Aborted connection 6 to db: 'seahub_db' user: 'seafile' host: '172.20.0.3' (Got an error reading communication packets)
...
seafile-seafile-caddy-1   | {"level":"error","ts":1681829569.7380185,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"write tcp 172.19.0.2:80->172.22.82.61:64194: write: broken pipe"}
seafile-seafile-caddy-1   | {"level":"error","ts":1681829601.3078158,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"write tcp 172.19.0.2:80->172.22.82.61:64205: write: connection reset by peer"}
seafile-seafile-caddy-1   | {"level":"error","ts":1681829601.3115315,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"write tcp 172.19.0.2:80->172.22.82.61:64187: write: connection reset by peer"}
seafile-seafile-server-1  | 2023-04-18 15:36:50 ../common/block-backend-fs.c(237): [block bend] Failed to stat block ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9:8b36fe37afd9d07a3c58f6c7ea0945a4ccce9077 at /opt/seafile/seafile-data/storage/blocks/ee994f7a-ea6f-4e7f-9cdf-b86ba20061f9/8b/36fe37afd9d07a3c58f6c7ea0945a4ccce9077: No such file or directory.
seafile-seahub-1          | 2023-04-18 15:47:28,618 [WARNING] django.request:224 log_response Not Found: /notification/ping
seafile-seahub-1          | 2023-04-18 15:47:28,618 [WARNING] django.request:224 log_response Not Found: /notification/ping

I'm guessing the communication between the containers is not the best for some reason, and at some point the server failed to recieve a block that it thinks it has. Here's my compose config file:

version: '3.8'
services:
  seafile-server:
    image: ggogel/seafile-server:10.0.1
    volumes:
    - /mnt//cami-uwu/seafile/shared:/shared
    environment:
      DB_HOST: db
      DB_ROOT_PASSWD: db_dev
      TIME_ZONE: Etc/UTC
      HTTPS: 'false'
      SEAFILE_SERVER_HOSTNAME: 172.22.172.137
    depends_on:
    - db
    - seafile-caddy
    networks:
    - seafile-net
    restart: unless-stopped

  seahub:
    image: ggogel/seahub:10.0.1
    volumes:
    - /mnt/cami-uwu/seafile/shared:/shared
    environment:
      SEAFILE_ADMIN_EMAIL: [email protected]
      SEAFILE_ADMIN_PASSWORD: CjEj54TgSfysmaRh
    depends_on:
    - seafile-server
    - seafile-caddy
    - seahub-media
    - memcached
    networks:
    - seafile-net
    restart: unless-stopped

  seahub-media:
    image: ggogel/seahub-media:10.0.1
    volumes:
    - /mnt/cami-uwu/seafile/shared/seafile/seahub-data/avatars:/usr/share/caddy/media/avatars
    - /mnt/cami-uwu/seafile/shared/seafile/seahub-data/custom:/usr/share/caddy/media/custom
    depends_on:
    - seafile-caddy
    networks:
    - seafile-net
    restart: unless-stopped

  db:
    image: mariadb:10.7.8
    environment:
      MYSQL_ROOT_PASSWORD: db_dev
      MYSQL_LOG_CONSOLE: 'true'
    hostname: db
    volumes:
    - /mnt/cami-uwu/seafile/mariadb:/var/lib/mysql
    networks:
    - seafile-net
    restart: unless-stopped

  memcached:
    image: memcached:1.6.19
    entrypoint: memcached -m 1024
    networks:
    - seafile-net
    restart: unless-stopped

  seafile-caddy:
    image: ggogel/seafile-caddy:1.0.8
    ports:
    - 80:80
    networks:
      seafile-net: null
      default: null
    restart: unless-stopped

networks:
  seafile-net:
    internal: true

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
compose/docker-compose-dev.yml
  • mariadb 10.11.8
  • memcached 1.6.28
compose/docker-compose-kompose.yml
  • ggogel/seafile-server 11.0.9
  • ggogel/seahub 11.0.9
  • ggogel/seahub-media 11.0.9
  • mariadb 10.11.8
  • memcached 1.6.28
compose/docker-compose-swarm.yml
  • ggogel/seafile-server 11.0.9
  • ggogel/seahub 11.0.9
  • mariadb 10.11.8
  • memcached 1.6.28
  • ggogel/seafile-caddy 2.7.6
compose/docker-compose.yml
  • ggogel/seafile-server 11.0.9
  • ggogel/seahub 11.0.9
  • ggogel/seahub-media 11.0.9
  • mariadb 10.11.8
  • memcached 1.6.28
  • ggogel/seafile-caddy 2.7.6
dockerfile
seafile-caddy/Dockerfile
  • caddy 2.7.6-alpine
seafile-server/Dockerfile
  • alpine 3.18.6
  • ubuntu jammy@sha256:19478ce7fc2ffbce89df29fea5725a8d12e57de52eb9ea570890dc5852aac1ac
  • ubuntu jammy@sha256:19478ce7fc2ffbce89df29fea5725a8d12e57de52eb9ea570890dc5852aac1ac
seahub-media/Dockerfile
  • alpine 3.18.6
  • caddy 2.7.6-alpine
seahub/Dockerfile
  • alpine 3.18.6
  • python 3.10.14-alpine3.18
  • python 3.10.14-alpine3.18
github-actions
.github/workflows/auto_release.yml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
kubernetes
k8s/db-deployment.yaml
  • mariadb 10.11.8
  • Deployment apps/v1
k8s/memcached-deployment.yaml
  • memcached 1.6.28
  • Deployment apps/v1
k8s/seafile-ingress.yaml
  • Ingress networking.k8s.io/v1
k8s/seafile-server-deployment.yaml
  • ggogel/seafile-server 11.0.9
  • Deployment apps/v1
k8s/seahub-deployment.yaml
  • ggogel/seahub 11.0.9
  • Deployment apps/v1
k8s/seahub-media-deployment.yaml
  • ggogel/seahub-media 11.0.9
  • Deployment apps/v1
pip_requirements
seafile-caddy/Dockerfile
seafile-server/Dockerfile
  • sqlalchemy ==2.0.30
  • click ==8.1.7
  • termcolor ==2.4.0
  • colorlog ==6.8.2
  • pymysql ==1.1.1
  • jinja2 ==3.1.4
  • pycryptodome ==3.20.0
  • lxml ==5.2.2
  • python-ldap ==3.4.4
seahub/Dockerfile
  • future ==1.0.0
  • pillow ==10.3.0
  • captcha ==0.5.0
  • pyjwt ==2.8.0
  • mysqlclient ==2.2.4
  • django ==4.2.13
  • django-pylibmc ==0.6.1
  • django-simple-captcha ==0.6.0
  • pycryptodome ==3.20.0
  • djangosaml2 ==1.9.3
  • python-ldap ==3.4.4
  • sqlalchemy ==2.0.30
regex
seafile-server/Dockerfile
  • haiwen/seahub 11.0.9
  • haiwen/seahub 11.0.9
seahub-media/Dockerfile
  • haiwen/seahub 11.0.9
seahub/Dockerfile
  • haiwen/seahub 11.0.9

  • Check this box to trigger a request for Renovate to run again on this repository

Option to specify seafile-memcached hostname

Currently I hit a roadblock when running this inside Podman Quadlets with a pod, a Podman pod has internal services listening on 0.0.0.0. However, it seems that the seahub image has no way to change the hostname for memcached and it's just hardcoded to memcached, which is problematic.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (config:base, :semanticCommitsDisabled)

Restart loop in `seafile-server` and unknown server host `db`

I'm running into some strange issues wherein my seafile-server seems to be stuck in a restart loop, and the db service appears to be unreachable. I'm also seeing some worrying "Could not bind socket" errors in seafile-server. In my client, I'm seeing "Library damaged on server" errors, but I think that's just inaccurate messaging.

seafile-server_1    | 2022-05-02 00:51:23 seafile-controller.c(191): starting seaf-server ...
seafile-server_1    | 2022-05-02 00:51:23 seafile-controller.c(82): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-9.0.4/runtime
seafile-server_1    | 2022-05-02 00:51:23 seafile-controller.c(116): spawned seaf-server, pid 1422737
seafile-server_1    | 2022-05-02 00:51:23 socket file exists, delete it anyway
seafile-server_1    | 2022-05-02 00:51:23 ../common/seaf-utils.c(333): Use database Mysql
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(195): fileserver: worker_threads = 10
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(210): fileserver: fixed_block_size = 8388608
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(225): fileserver: web_token_expire_time = 3600
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(240): fileserver: max_indexing_threads = 1
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(255): fileserver: max_index_processing_threads= 3
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(277): fileserver: cluster_shared_temp_file_mode = 600
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(2859): Could not bind socket: Address already in use
seafile-server_1    | 2022-05-02 00:51:23 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:23 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:23 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:25 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:25 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:25 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:25 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:27 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:27 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:29 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:29 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:29 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:29 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:31 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:31 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:31 ../common/seaf-db.c(732): Failed to connect to MySQL: Unknown server host 'db' (-3)
seafile-server_1    | 2022-05-02 00:51:31 http-server.c(888): DB error when check repo existence.
seafile-server_1    | 2022-05-02 00:51:33 seafile-controller.c(447): pid file /opt/seafile/pids/seaf-server.pid does not exist
seafile-server_1    | 2022-05-02 00:51:33 seafile-controller.c(513): seaf-server need restart...
seafile-server_1    | 2022-05-02 00:51:33 seafile-controller.c(191): starting seaf-server ...

Then it loops, and I see the same sort of messages again.

Here are some from seahub:

seahub_1            | django.db.utils.OperationalError: (2005, "Unknown MySQL server host 'db' (-3)")
seahub_1            | ngo/db/backends/base/base.py", line 200, in connect
seahub_1            |     self.connection = self.get_new_connection(conn_params)
seahub_1            |   File "/opt/seafile/seafile-server-latest/seahub/thirdpart/django/utils/asyncio.py", line 26, in inner
seahub_1            |     return func(*args, **kwargs)
seahub_1            |   File "/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/backends/mysql/base.py", line 234, in get_new_connection
seahub_1            |     connection = Database.connect(**conn_params)
seahub_1            |   File "/usr/lib/python3.8/site-packages/MySQLdb/__init__.py", line 123, in Connect
seahub_1            |     return Connection(*args, **kwargs)
seahub_1            |   File "/usr/lib/python3.8/site-packages/MySQLdb/connections.py", line 185, in __init__
seahub_1            |     super().__init__(*args, **kwargs2)
seahub_1            | django.db.utils.OperationalError: (2005, "Unknown MySQL server host 'db' (-3)")

Last logs from the db service:

db_1                | 2022-04-19  4:20:49 6684 [Warning] Aborted connection 6684 to db: 'ccnet_db' user: 'seafile' host: '172.18.0.6' (Got an error reading communication packets)
db_1                | 2022-04-19  4:20:49 6683 [Warning] Aborted connection 6683 to db: 'seafile_db' user: 'seafile' host: '172.18.0.6' (Got an error reading communication packets)
db_1                | 2022-04-19  4:20:49 6751 [Warning] Aborted connection 6751 to db: 'seafile_db' user: 'seafile' host: '172.18.0.6' (Got an error reading communication packets)
db_1                | 2022-04-19  4:20:50 7502 [Warning] Aborted connection 7502 to db: 'seahub_db' user: 'seafile' host: '172.18.0.5' (Got an error reading communication packets)

I'm going to leave my server as-is for now in case you'd like me to supply any more info.

/scripts/gc.sh does no end

Hi,
I assume it might be a problem with the script itself, but maybe someone saw it before?
so I go to the container and I run the script
it executes perfectly bu tthen it never ends with such problem

(...)
2023-03-15 12:54:28 gc-core.c(606): === GC is finished ===
seafserv-gc run done

Done.
Seafile CE: Offline garbage collection completed. Starting Seafile.

Starting seafile server, please wait ...
** Message: 12:54:31.807: seafile-controller.c(621): No seafevents.

Seafile server started

Done.
Waiting for SeaRPC socket...
2023/03/15 12:54:34 socat[12985] W ioctl(5, IOCTL_VM_SOCKETS_GET_LOCAL_CID, ...): Inappropriate ioctl for device

seahub container without internet access

Might be problem of my setup - but tried to setup SSO with keycloak which failed with the seahub container logging:

seahub-1 | 2024-05-11 23:26:27,633 [ERROR] seahub.oauth.views:154 oauth_callback HTTPSConnectionPool(host='keycloak.xx.yy', port=443): Max retries exceeded with url: /realms/kendoo/protocol/openid-connect/token (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6660647af0>: Failed to resolve 'keycloak.xx.yy' ([Errno -3] Try again)"))
seahub-1 | 2024-05-11 23:26:28,074 [INFO] xmlschema:1234 include_schema Resource 'XMLSchema.xsd' is already loaded

entering the container shows no internet access / dns resolution

e3a3b4aa0af2:/# ping keycloak.xx.yy
ping: bad address 'keycloak.xx.yy'

I changed docker-compose.yaml for seahub container to contain also network default - after that ping works and SSO works. Suggesting seahub container should also have default network (but might me my setup) . By the way many changes for SSO between version 10 and 11 so make sure to use most up 2 date documentation.

Unable to log into web interface since upgrade

Thank you ever so much for the work you've put into upgrading us to Seafile CE 11.

It works and syncs fine with my clients.

When I go to my seafile instance website, I put in my username and password (correctly), and then this error message pops up:

Forbidden (403)
CSRF verification failed. Request aborted.
More information is available with DEBUG=True.

Any ideas on why that is happening? I can't go further so cannot access my seafile instance website anymore.

Error when trying to start mariadb container

Hello, I have my docker-compose.yml setup as shown below. Noticeable difference being that I'm using the mount points instead of docker volumes because I want to keep all the data in a separate disk mounted at /run/media/Backup. But every time I do a docker-compose up -d the mariadb container errors out with:

2021-08-08 14:51:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started.
chown: changing ownership of '/var/lib/mysql/': Operation not permitted

Can you please help me with this issue? (Also thanks for your excellent work 👍 and please feel free to close this if you deem it unnecessary)

My compose file:

version: '3.8'
services:
  seafile-server:
    image: ggogel/seafile-server:8.0.6
    volumes:
      - /run/media/myuser/Backup/seafile/seafile-data:/shared
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=password
      - TIME_ZONE=America/Los_Angeles
      - HTTPS=true
      - SEAFILE_SERVER_LETSENCRYPT=true # Set this to true if you plan to use a reverse proxy with HTTPS. Can be changed later in the admin settings on the web-ui.
      - SEAFILE_SERVER_HOSTNAME=seafile.mydomain.com # Mandatory on first deployment!
    depends_on:
      - db
      - memcached
      - seafile-caddy
    networks:
      - seafile-net

  seahub:
    image: ggogel/seahub:8.0.6
    volumes:
      - /run/media/myuser/Backup/seafile/seafile-data:/shared
      - /run/media/myuser/Backup/seafile/seafile-avatars:/shared/seafile/seahub-data/avatars
      - /run/media/myuser/Backup/seafile/seafile-custom:/shared/seafile/seahub-data/custom
    environment:
      - [email protected]
      - SEAFILE_ADMIN_PASSWORD=password
    depends_on:
      - seafile-server
      - seafile-caddy
    networks:
      - seafile-net

  seahub-media:
    image: ggogel/seahub-media:8.0.6
    volumes:
      - /run/media/myuser/Backup/seafile/seafile-avatars:/shared/seafile/seahub-data/avatars
      - /run/media/myuser/Backup/seafile/seafile-custom:/shared/seafile/seahub-data/custom
    depends_on:
      - seafile-server
      - db
      - memcached
      - seafile-caddy
    networks:
      - seafile-net

  db:
    image: mariadb:10.5.8
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /run/media/myuser/Backup/seafile/seafile-mariadb:/var/lib/mysql
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.9
    entrypoint: memcached -m 1024
    networks:
      - seafile-net

  seafile-caddy:
    image: ggogel/seafile-caddy:1.0.4
    ports:
      - "3000:80" # Point your reverse proxy to port 80 of this service
    networks:
      - seafile-net
      - default

networks:
  seafile-net:
    internal: true

Things I noticed after the first start-up

After I got it working today (Docker images as of 21. April) with Caddy as reverse-proxy

  • Firefox shows a yellow exclamation mark as the default user logo (http://<domain>/media/avatars/default.png) is served via HTTP (instead of HTTPS)
  • with HTTPS=true in the docker-compose.yml FILE_SERVER_ROOTin the web interface was "https:...", but SERVICE_URL was "http:..."
  • with TIME_ZONE=Europe/Berlin in the docker-compose.yml the time in the web interface seems to be UTC (2 hrs. behind actual time).
  • In the docker log for the database (docker logs seafile_db_1) I see
2021-04-21 16:46:18 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'root' host: '<IP>' (Got an error reading communication packets)
2021-04-21 16:46:18 5 [Warning] Aborted connection 5 to db: 'ccnet_db' user: 'seafile' host: '<IP>' (Got an error reading communication packets)
2021-04-21 16:46:19 6 [Warning] Aborted connection 6 to db: 'seafile_db' user: 'seafile' host: '<IP>' (Got an error reading communication packets)
2021-04-21 16:46:19 7 [Warning] Aborted connection 7 to db: 'seahub_db' user: 'seafile' host: '<IP>' (Got an error reading communication packets)
2021-04-21 16:46:20 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'root' host: '<IP>' (Got an error reading communication packets)

P.S. I'm new in Docker / Caddy / Seafile ;-)

Nginx reverse proxy conf for both HTTP and HTTPS

I've been hitherto using an instance of the official seafile-docker, but currently I can't manage to get it up and running. Then I found this fork earlier today and wanted to give it a try.

I need help with refactoring my Nginx reverse proxy configuration so it can reverse-proxy seafile-caddy.

Context

  • My host hosts multiple exposed services, so the ports 80 and 443 are already busy.
  • I use Nginx as a reverse proxy.
  • I'd let the official seafile docker-compose.yml use ports 81:80 and 442:443.
  • Currently the seafile-caddy-1 is plugged to port 81, however port 442 is now idle.
  • My Nginx configuration for the official seafile-docker has been such:
server {
    listen 80;
    listen [::]:80 http2 ipv6only=on;
    server_name seafile.mydomain.com;

    client_max_body_size 0;

    location / {
        proxy_pass http://localhost:81;
    }

}
server {
    listen [::]:443 ssl http2;
    listen 443 ssl http2;
    server_name seafile.mydomain.com;

    client_max_body_size 0;

    ssl_certificate /etc/letsencrypt/live/seafile.mydomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/seafile.mydomain.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass https://localhost:442;
    }

}

Notification server seems to not work properly

Hi, I finally got to checkout the newly enabled notification server from this #104 and I always get Bad Request 400 no matter the JWT key I generate. The /notification/ping does work, returns "pong" as they state, but the websocket one does not.

Can you share how you set it up so it works for you?

seafile.conf

[notification]
enabled = true
host = 0.0.0.0
port = 8083
log_level = info
jwt_private_key = a24xY5.....................the_rest_of_the_key............MZ0S0=

docker-compose.yaml

version: '3.8'
services:
  seafile-server:
    image: ggogel/seafile-server:10.0.1_004
    volumes:
      - /mnt/user0/appdata-array/seafile/data:/shared
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=db_dev
      - TIME_ZONE=Europe/Berlin
      - HTTPS=false
      - SEAFILE_SERVER_HOSTNAME=
    depends_on:
      - db
      - memcached
      - seafile-caddy
    networks:
      - seafile-net

  seahub:
    image: ggogel/seahub:10.0.1_002
    volumes:
      - /mnt/user0/appdata-array/seafile/data:/shared
      - /mnt/user0/appdata-array/seafile/avatars:/shared/seafile/seahub-data/avatars
      - /mnt/user0/appdata-array/seafile/custom:/shared/seafile/seahub-data/custom
    environment:
      - SEAFILE_ADMIN_EMAIL=
      - SEAFILE_ADMIN_PASSWORD=
    depends_on:
      - seafile-server
      - seafile-caddy
      - seahub-media
    networks:
      - seafile-net

  seahub-media:
    image: ggogel/seahub-media:10.0.1_001
    volumes:
     - /mnt/user0/appdata-array/seafile/avatars:/usr/share/caddy/media/avatars
     - /mnt/user0/appdata-array/seafile/custom:/usr/share/caddy/media/custom
    depends_on:
      - seafile-caddy
    networks:
      - seafile-net

  db:
    image: mariadb:10.11.4
    environment:
      - MYSQL_ROOT_PASSWORD=db_dev
      - MYSQL_LOG_CONSOLE=false
      - MARIADB_AUTO_UPGRADE=true
    volumes:
      - /mnt/user0/appdata-array/seafile/db:/var/lib/mysql
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.21
    entrypoint: memcached -m 1024
    networks:
      - seafile-net

  seafile-caddy:
    image: ggogel/seafile-caddy:1.1.0
    ports:
      - "8068:80" # Point your reverse proxy to port 80 of this service
    networks:
      - seafile-net
      - default

networks:
  seafile-net:
    internal: true

I should mention that I have seafile behind NPM (nginx proxy manager), which redirect my domain to this docker compose's port 8068. The NPM has toggled on websocket support and adding manually the proxy pass (from bellow) does not seem to help

location = /connection {
        proxy_pass http://machineip:8068;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection "upgrade";
        proxy_set_header    Host $http_host;
        proxy_set_header    X-Real-IP $remote_addr;
    }

Cannot connect to mysql DB

Hello,

while trying to start seafile-server:8.0.8 I am not able to connect to my mysql DB.
waiting for mysql server to be ready: %s (1045, "Access denied for user 'root'@'172.17.0.3' (using password: NO)") waiting for mysql server to be ready: %s (1045, "Access denied for user 'root'@'172.17.0.3' (using password: NO)") waiting for mysql server to be ready: %s (1045, "Access denied for user 'root'@'172.17.0.3' (using password: NO)")

Remote connections are possible to the db (tested it already). Mysql is running with Ver 8.0.30 and the new caching_sha2_password plugin is enabled.

If I revert back to the mysql_native_password auth I get:

waiting for mysql server to be ready: %s (2059, "Authentication plugin 'b'caching_sha2_password'' not configured")

Any ideas?

EDIT:
I am running it via docker run -p 127.0.0.1:8000:80 -d --rm -e HTTPS=true -e DB_HOST=XXXXXX -e DB_ROOT_PASSWD=XXXXXX -v seafile_new:/shared --name seafile_server ggogel/seafile-server:8.0.8

SEAFILE_SERVER_LETSENCRYPT variable

To me it looks like the SEAFILE_SERVER_LETSENCRYPT variable in docker-compose.yml is a leftover from the orignal Seafile configuration but no longer used in this project. Is that correct?

building on oci/arm64

Hi,

I tried to build the images on arm64, but I ended up with this error, any ideas on how to fix it?

seafile-server     | Starting seafile server, please wait ...
seafile-server     | /opt/seafile/seafile-server-9.0.10/seafile.sh: line 143: /opt/seafile/seafile-server-9.0.10/seafile/bin/seafile-controller: cannot execute binary file: Exec format error
seafile-seahub     |
seafile-seahub     | LC_ALL is not set in ENV, set to en_US.UTF-8
seafile-seahub     | Starting seahub at port 8000 ...
seafile-seahub     |
seafile-seahub     | Error happened during creating seafile admin.
seafile-seahub     |
seafile-server     | Traceback (most recent call last):
seafile-server     |   File "/scripts/start.py", line 66, in <module>
seafile-server     |     main()
seafile-server     |   File "/scripts/start.py", line 55, in main
seafile-server     |     call('{} start'.format(get_script('seafile.sh')))
seafile-server     |   File "/scripts/utils/__init__.py", line 70, in call
seafile-server     |     return subprocess.check_call(*a, **kw)
seafile-server     |   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
seafile-server     |     raise CalledProcessError(retcode, cmd)
seafile-server     | subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-9.0.10/seafile.sh start' returned non-zero exit status 1.
seafile-server     | Failed to start seafile server
seafile-seahub     |
seafile-seahub     | Seahub is not running
seafile-seahub     | Done.

Full text search support? elasticsearch?

Would absolutely love to take this for a spin but I can't live without full text search support with elasticsearch or equivalent. Any plans to look into adding this?

reset_admin.sh

The script /opt/seafile/seafile-server-latest/reset_admin.sh inside seafile-server throws an error:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-9.0.10/seahub/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/core/management/__init__.py", line 395, in execute
    django.setup()
  File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/apps/config.py", line 224, in create
    import_module(entry)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'captcha'

This seems to be a missing python dependency

EDIT:
Ok, my bad. I see that the seahub container has those dependencies but not the script. I suppose this is on purpose?
My problem is that I cannot do my initial login with the admin credentials supplied in docker-compose.yml after deployment. This also didn't work on the regular seafile installation but running the reset_admin.sh script fixed it.

Emails are not being send

I seems to be having a problem with sending emails. I have added the config to seahub_settings.py conform the instructions from Seafile:
(Using a app password from Gmail.)

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'app_password'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

Whenever an email needs to be send I get a notification that says

"Successfully reset password to ------, but failed to send email to [email protected], please check your email configuration."

I am running the latest ggogel/seafile-containerized docker file with seafile 11.0.6.

As per issue 5933 I have tried to add the following to the environment of the seahub container, but this does not seem to solve anything.

SSL_CERT_FILE=/etc/ssl/certs/cabundle.pem

Furthermore, that pem file is not available at that location within the container:

Looking in seahub.log I see this error popping up when trying to send an email:
[WARNING] seahub.api2.endpoints.admin.users:1508 put [Errno -3] Try again

Run server using non-root user

Hello,

Although the "official" docker image does not allow running the server with a non-root user, there were community efforts done to solve this problem, as documented in haiwen/seafile-docker#86.
After running such a setup I am now trying to find a way to do the same thing with this project as I would like to migrate my data over.
Is this already possible and if not what has to be done to allow this?

Thank you very much for this project!

Possible to use seafile with an existing MariaDB server instead of extra container?

Hi Gerrit,

I'd like to run seafile with an existing MySQL server instead of spinning up an extra MariaDB docker container just for that.

According to this manual I'd have to create three databases (ccnet_db, seafile_db, seahub_db) and a user. (I don't have root rights on my SQL server, therefore using method two.)

Now I'm wondering if it is possible to pass information like host server and database names as well as the user credentials to seafile using env variables.

Obviously I could just follow the manual but I'd like to keep running seafile and everything else inside a container just not the database.

Thanks for your help
Alex

Renew a certificat

Hi,

Can I have some help, my lets'encrypt cert was expired and I have some diffculties to renew cert.
It's another people mount this stack and I have no document to help my self.

Thank you

Incorrect email or password

I run a fresh container (I use caddy as proxy) and it boots up fine.
Then I want to login with the predefined admin mail and password but in response I get Incorrect email or password any idea how this happens and how to fix or look into it for a fix?


After a container restart I get Page unavailable after login.
Something I found while looking at the container output:

2021-01-27 18:28:04 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'root' host: '172.20.0.1' (Got an error reading communication packets)

Support initializing mysql database over IPv6

Please add support for initializing the mysql database over IPv6.
Currently the mysql user is created with host %.%.%.% instead of %.

The change should be as simple as changing line 59 in seafile-server/scripts/bootstrap.py.

Web cannot upload and download

Hello, I cannot upload or download files on the web page after deployment. Is there something wrong with my configuration? The environment is Macos12 and debain Lite Edition.

seafile not coming up after upgrade from 11.0.2 to 11.0.8

Upgraded docker-compose from 11.0.2 to 11.0.8 today and seafile won't come up (works if downgrading to 11.0.2 again). Only error in error Log is:

seafile-caddy-1 | {"level":"error","ts":1715427215.1893396,"logger":"http.log.error","msg":"dial tcp: lookup seahub on 127.0.0.11:53: server misbehaving","request":{"remote_ip":"172.19.0.9","remote_port":"37570","client_ip":"172.19.0.9","proto":"HTTP/1.1","method":"GET","host":"seafile.kendoo.eu","uri":"/","headers":{"Cookie":[],"Sec-Ch-Ua-Mobile":["?0"],"User-Agent":["Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"],"Accept-Language":["de-DE,de;q=0.9,en-GB;q=0.8,en;q=0.7,en-US;q=0.6"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Site":["none"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Ch-Ua":[""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123""],"X-Forwarded-Host":["seafile.kendoo.eu"],"Sec-Ch-Ua-Platform":[""Chrome OS""],"Upgrade-Insecure-Requests":["1"],"X-Forwarded-For":["87.132.14.213"],"Sec-Fetch-Mode":["navigate"],"Sec-Fetch-User":["?1"],"X-Forwarded-Proto":["https"]}},"duration":0.002633181,"status":502,"err_id":"j1kbbgb57","err_trace":"reverseproxy.statusError (reverseproxy.go:1267)"}

can provide full log if necessary

Emails fail to send due to DNS issue

Seafile can be configured to send out emails for things such as password resets or new user registration. Setup is described here: https://manual.seafile.com/config/sending_email/

My email settings are configured correctly, but the emails fail to send and return with Errno-3. Google suggests Errno-3 thrown by django is due to a DNS name resolution problem. Indeed, if I add the default network to either seahub or seafile-server (sorry I can't remember which one; I currently have it added to both while I'm troubleshooting some other issues) then the emails will send successfully.

[Question] Docker Volumes

First of all: Thank you!

You write in your documentation "Of course you could also just use the old paths but I would strongly advise against that."

If I am running host mounts to a ZFS filesystem, what are in your opinion the disadvantages over docker volumes on a small deployment?

Seafile version 8.0.8

If possible please provide Seafile version 8.0.8. Seafile 9 is still declared as beta, hence I'm hesitant to use it.

Seahub docker container not starting properly after the first time.

When starting up the seahub container after staring it the first time it fails to load. Once you log into the seafile web interface it gives a page unavailable error. This only happens after the first time you restart the container. I've already tried giving the seahub container a longer time to restart / shut down, but it still happens. Manually deleting the seafile.sock file causes it to work without restarting the container.
Error log:

2021/02/19 02:36:02 socat[11664] N exit(1)
Starting socat...
2021/02/19 02:36:02 socat[11666] E "/opt/seafile/seafile-server-latest/runtime/seafile.sock" exists
2021/02/19 02:36:02 socat[11666] N exit(1)
Starting socat...
2021/02/19 02:36:02 socat[11668] E "/opt/seafile/seafile-server-latest/runtime/seafile.sock" exists
2021/02/19 02:36:02 socat[11668] N exit(1)

compose file

version: '3.8'
services:
  seafile-server:
    image: ggogel/seafile-server:8.0.3
    volumes:
      - seafile-data:/shared
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=hunter2
      - TIME_ZONE=America/Detroit
      - HTTPS=false # Set this to true if you plan to use a reverse proxy with HTTPS. Can be changed later in the admin settings on the web-ui.
      - SEAFILE_SERVER_HOSTNAME=203.0.113.2 # Mandatory on first deployment!
    depends_on:
      - db
      - memcached
      - seafile-caddy
    networks:
      - seafile-net

  seahub:
    image: ggogel/seahub:8.0.3
    volumes:
      - seafile-data:/shared
      - seahub-avatars:/shared/seafile/seahub-data/avatars
      - seahub-custom:/shared/seafile/seahub-data/custom
    environment:
      - [email protected]
      - SEAFILE_ADMIN_PASSWORD=asecret
    depends_on:
      - seafile-server
      - seafile-caddy
    networks:
      - seafile-net

  seahub-media:
    image: ggogel/seahub-media:8.0.3
    volumes:
     - seahub-avatars:/usr/share/caddy/media/avatars
     - seahub-custom:/usr/share/caddy/media/custom
    depends_on:
      - seafile-server
      - db
      - memcached
      - seafile-caddy
    networks:
      - seafile-net

  db:
    image: mariadb:10.5.8
    environment:
      - MYSQL_ROOT_PASSWORD=hunter2
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - seafile-mariadb:/var/lib/mysql
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.9
    entrypoint: memcached -m 1024
    networks:
      - seafile-net

  seafile-caddy:
    image: ggogel/seafile-caddy:1.0.0
    ports:
      - "80:80" # Point your reverse proxy to port 80 of this service
    networks:
      - seafile-net
      - default

networks:
  seafile-net:
    internal: true

volumes:
  seafile-data:
  seafile-mariadb:
  seahub-avatars:
  seahub-custom:

P.s Thanks for creating the docker containers. This was by far the easiest way to set up seafile.

'seafile' user password

I set this up before and had it working, but I had to reconfigure it. Now with a fresh setup I'm getting an error that the seafile user can't login, and I can't figure out where the user's password is defined.

Is it a best practice to `docker compose exec seafile-server bash ` to the container to enable sefdav?

Because it looks like ggogel/seafile-server:10.0.1 does not have sefdav enabled by default.

# /opt/seafile/conf/seafdav.conf

[WEBDAV]
# Default is false. Change it to true to enable SeafDAV server.
enabled = true
port = 8080
share_name = /seafdav

Maybe we can enable SeafDAV by default here?

# Modify seafdav config
if os.path.exists(join(topdir, 'conf', 'seafdav.conf')):
with open(join(topdir, 'conf', 'seafdav.conf'), 'r') as fp:
fp_lines = fp.readlines()
if 'share_name = /\n' in fp_lines:
replace_index = fp_lines.index('share_name = /\n')
replace_line = 'share_name = /seafdav\n'
fp_lines[replace_index] = replace_line
with open(join(topdir, 'conf', 'seafdav.conf'), 'w') as fp:
fp.writelines(fp_lines)

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.