GithubHelp home page GithubHelp logo

yuri-becker / seafile-mount Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 36 KB

๐Ÿ’พ Mount your Seafile libraries, but containerized.

Home Page: https://hub.docker.com/r/yuribecker/seafile-mount

License: GNU General Public License v3.0

Dockerfile 39.65% Shell 60.35%
dockerfile seafile seafile-client

seafile-mount's Introduction

GPL 3 License Docker GitHub


seafile-mount

Mount your Seafile libraries, but containerized.

About

This docker image mounts a Seafile user's library using the seadrive client, which streams a filesystem instead of syncing.

Using Seadrive containerized has several advantages (probably โ€“ in my case, it was just an infrastructural requirement).

Image supports x86_64 and arm64 because that's what Seadrive is available for. Albeit, the arm64 Debian repository for Seadrive didn't receive the latest patches, but still works.

Drawbacks

Your host system needs to have Fuse installed and the container needs to be run with --privileged.

Running it

Example

Command line

docker run --privileged \
--env-file ./.env \
--mount type=bind,source=/home/yuri/seafile-mount,target=/seafile,bind-propagation=rshared \
-it seafile-mount

docker-compose.yml

version: "3"
services:
  seadrive:
    container_name: seadrive
    image: yuribecker/seafile-mount:latest
    environment:
      - SEAFILE_MOUNT_SERVER=https://seadrive.example.org
      - [email protected]
      - SEAFILE_MOUNT_TOKEN=TOKEN
    privileged: true
    volumes:
      - type: bind
        bind:
          propagation: rshared
        source: /home/yuri/seafile-mount
        target: /seafile

Environment Variables

Name Description Default
SEAFILE_MOUNT_SERVER URL of your server (including https://) required
SEAFILE_MOUNT_USERNAME Username (email) of the user required
SEAFILE_MOUNT_TOKEN Token for the user, see Acquiring a Token required
SEAFILE_MOUNT_IS_PRO Is server Professional Edition? (true/false) false
SEAFILE_MOUNT_CLIENT_NAME Name for how this client should show up in Seafile's admin panel Seafile Docker Mount
SEAFILE_MOUNT_CACHE_SIZE_LIMIT Size limit for the cache 10GB
SEAFILE_MOUNT_CLEAN_CACHE_INTERVAL Interval for cache cleaning in minutes 10
SEAFILE_MOUNT_FUSE_OPTS FUSE mount options allow_root,auto_unmount
SEAFILE_MOUNT_ALLOW_OTHER Shortcut for SEAFILE_MOUNT_FUSE_OPTS=allow_other,auto_unmount (set to yes) optional

See the official documentation for more info about these options.
"Info" in this case means there isn't much info in the official documentation anyway.

Acquiring a Token

As shown in the official documentation, request a token from your Seafile instance's API.

curl --url https://YOUR_SEAFILE_INSTANCE/api2/auth-token/ \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data-urlencode "username=EMAIL" \
  --data-urlencode "password=PASSWORD"

Note that it doesn't work with a Token extracted from a browser session.

seafile-mount's People

Contributors

yuri-becker avatar

Watchers

 avatar

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.