VGoshev / seafile-docker

Docker image for Seafile server
https://hub.docker.com/r/sunx/seafile/
MIT License
27 stars 19 forks source link

Seafile Server Docker image

Seafile server Docker image based on Alpine Linux.

Also in my Github repository you can find some usefull scripts for helping running containers.

Supported tags and respective Dockerfile links

Dockerfiles for older versions of Seafile Server you can find there.

Quickstart

To run container you can use following command:

docker run \  
  -v /home/docker/seafile:/home/seafile \  
  -p 127.0.0.1:8000:8000 \  
  -p 127.0.0.1:8082:8082 \  
  -ti sunx/seafile`

Containers, based on this image will automatically configure Seafile enviroment if there isn't any. If Seafile enviroment is from previous version of Seafile, container will automatically upgrade it to latest version (by calling Seafile upgrade scripts).

But I would advise you to do data backups before upgrading image (to not lose your data in case of bugs in upgrade logic of this image or Seafile upgrde scripts).

Detailed description of image and containers

Used ports

This image uses 2 tcp ports:

If you want to run seafdav (WebDAV for Seafile), then port 8080 will be used also.

Volume

This image uses one volume with internal path /home/seafile

I would recommend you use host directory mapping of named volume to run containers, so you will not lose your valuable data after image update and starting new container

Web server configuration

This image doesnt contain any web-servers, because you, usually, already have some http server running on your server and don't want to run any extra http-servers (because it will cost you some CPU time and Memory). But if you know some really tiny web-server with proxying support, tell me and I would be glad to integrate it to the image.

For Web-server configuration, as media directory location you should enter <volume/path>/seafile-server/seahub/media

In httpd-conf directory you can find lighttpd config example and haaproxy config example.

You can find Nginx and Apache configurations in official Seafile Server Manual.

Supported ENV variables

When you running container, you can pass several enviroment variables (with --env option of docker run command):

Useful commands in container

When you're inside of container, in home directory of seafile user, you can use following useful commands:

Tips&Tricks and Known issues

License

This Dockerfile and scripts are released under MIT License.

Seafile and Alpine Linux have their own licenses.