Coder Social home page Coder Social logo

docker-seafile's Introduction

Seafile 4 for Docker

Seafile is a "next-generation open source cloud storage with advanced features on file syncing, privacy protection and teamwork".

This Dockerfile does not really package Seafile 4 for Docker, but provides an environment for running it including startup scripts, including all dependencies for both a SQLite or MySQL (requires external MySQL database, for example in another container) setup.

Setup

The image only prepares the base system and provides some support during installation. Read through the setup manual before setting up Seafile.

Run the image in a container, exposing ports as needed and making /opt/seafile permanent. For setting seafile up, maintaining its configuration or performing updates, make sure to start a shell. As the image builds on phusion/baseimage, do so by attaching -- /bin/bash as parameter.

For example, you could use

docker run -t -i \
  -p 10001:10001 \
  -p 12001:12001 \
  -p 8000:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -v /srv/seafile:/opt/seafile \
  jenserat/seafile -- /bin/bash

Consider using a reverse proxy for using HTTPs.

  1. After the container is started, run download-seafile to download Seafile and prepare setting it up.
  2. Once downloaded, run /opt/seafile/seafile-server-4.*/setup-seafile.sh, and go through the setup assistant. Do not change the port and storage location defaults, but change the run command appropriately.
  3. Run /opt/seafile/seafile-server-latest/seafile.sh start to start the seafile controller process.
  4. Run /opt/seafile/seafile-server-latest/seahub.sh start for configuring the web UI.
  5. If you want, do more configuration of Seafile. You can also already try it out.
  6. Setting up Seafile is finished, exit the container.

In case you want to use memcached instead of /tmp/seahub_cache/ add the following to your seahub_settings.py

CACHES = {
  'default': {
    'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
    'LOCATION': 'memcached:11211',
  }
}

Link your memcached instance to your seafile container by adding --link memcached_container:memcached to your docker run statement.

Running Seafile

Run the image again, this time you probably want to give it a name for using some startup scripts. You will not need an interactive shell for normal operation. The image will autostart the seafile and seahub processes if the environment variable autostart=true is set. A reasonable docker command is

docker run -d \
  --name seafile \
  -p 10001:10001 \
  -p 12001:12001 \
  -p 8000:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -v /srv/seafile:/opt/seafile \
  -e autostart=true \
  jenserat/seafile

For proxying Seafile using nginx, enable FastCGI by adding -e fastcgi=true.

Updates and Maintenance

The Seafile binaries are stored in the permanent volume /opt/seafile. To update the base system, just stop and drop the container, update the image using docker pull jenserat/seafile and run it again. To update Seafile, follow the normal upgrade process described in the Seafile upgrade manual. download-seafile might help you with the first steps if already updated to the newest version.

Workaround for Seafile issue #478

If used in FastCGI mode, like recommended when proxying WebDAV, seafdav only listens on localhost:8080; with consequence that it cannot be exposed. The image has a workaround built-in, which uses socat listening on 0.0.0.0:8080, forwarding to localhost:8081. To use it, modify /opt/seafile/conf/seafdav.conf and change the port to 8081, and restart the container enabling the workaround using -e workaround478=true.

docker-seafile's People

Contributors

abzieher avatar jenserat avatar oskapt avatar tuxayo avatar viktorlindgren avatar ypid avatar

Watchers

 avatar  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.