metz·log

Seafile 5.x on Nginx with uWSGI

·

This is just a small update of an earlier post about Seafile on Nginx with uWSGI.

The upgrade to Seafile 5.x needed a few changes to the uWSGI configuration because the Seafile directory layout changed a bit in 5.0.0. To pass the configuration locations to seahub the environment variables changed a tiny bit. There’s now SEAFILE_CENTRAL_CONF_DIR in addition to the other environment variables.

The full uWSGI configuration now looks like this:

/etc/uwsgi/apps-available/seafile.ini

[uwsgi]
plugins = python
uid = seafile
gid = seafile

topdir = /srv/seafile
env = CCNET_CONF_DIR=%(topdir)/ccnet
env = SEAFILE_CONF_DIR=%(topdir)/seafile-data
env = SEAFILE_CENTRAL_CONF_DIR=%(topdir)/conf # New in Seafile 5.x
env = SEAHUB_LOG_DIR=%(topdir)/logs

installpath = /srv/seafile/seafile-server-latest
env = PYTHONPATH=%(installpath)/seahub: \
  %(installpath)/seahub/thirdpart: \
  %(installpath)/seafile/lib64/python2.6/site-packages
env = DJANGO_SETTINGS_MODULE=seahub.settings

module = seahub.wsgi:application

Apart from this change, upgrading Seafile to 5.x worked just fine. The upgrade scripts did their work and there was no need to touch the web server configuration at all. Overall this was a very uncomplicated upgrade for a web service.