Skip to content
Wessel Stoop edited this page Nov 21, 2024 · 27 revisions

Tech stack

  • Django
  • Bootstrap for layout
  • Custom Javascript (not that much)
  • SwaggerUI for the API documentation
  • We use Apache and UWSGI as webserver (but other webservers that work with Django are also okay)

Installation

Being easy to install was never a main goal when designing Signbank, and installing Signbank has caused headaches for more than one developer. To get around this, we have nowautomated the whole installation process with Ansible. You can find all necessary Ansible playbooks here, but even if you cannot use Ansible we recommend taking a look because it nicely outlines all the steps that need to be taken.

A quick overview of what Ansible does:

  • Installs all required software packages. Important ones are imagemagick, ffmpeg and postfix.
  • Installs Apache and all required modules, and install the configuration file.
  • Clones the repo
  • Creates a virtual environment with all required dependencies
  • Creates a writable folder with all required subfolders. Logs, database, glossvideo and glossimage are the most important ones.
  • Creates a symlink to the correct settings file
  • Moves all static files to the correct place
  • Sets up uwsgi (link between Apache and Signbank)
  • Sets up rc.local so everything starts automatically

Whether you use Ansible or not, Signbank requires an existing database in the correct format to function correctly, and will not generate an emtpy one when you start the application.

To serve static media (videos and images) only to users that are logged in, we use X-sendfile. If you cannot use Ansible to install it, use these commands:

https://raw.githubusercontent.com/nmaier/mod_xsendfile/master/mod_xsendfile.c
apxs -cia mod_xsendfile.c

This is a recent version of X-sendfile; a (possibly more) stable variant can be found at https://tn123.org/mod_xsendfile/mod_xsendfile.c. And the following Apache configuration

XSendFile on
XSendFilePath <INSERT WRITABLE_FOLDER_LOCATION HERE>

Repository history and relations to other version of Signbank

This version of Signbank, called 'Global Signbank' was forked from the original version for Australian sign language, developed by Steve Cassidy on Bitbucket. It once started as the 'NGT Signbank', for the Dutch Signbank, but since then has been extended to be able to store multiple independent sign languages, mostly using grants secured by sign language researcher Onno Crasborn. Since Onno has left academia in 2023, the Global Signbank is maintained by the University of Amsterdam. At the time of writing, it is unclear whether there will be funding for the Global Signbank after 2024.

There are various other Signbanks, some of which are also forks of the original Australian version, some of which are forks of our code base. The ASL Signbank (https://aslsignbank.haskins.yale.edu/) uses the same code base as the Global Signbank, but runs on another server and uses another configuration.

Technical peculiarities

This is what you need to know if you start working on Signbank:

  • The main 'Django app' is called dictionary.
  • There is no manage.py file in the bin folder. Instead, we use develop.py.
  • We have one basic settings file, and then in the folder settings/server_specific a number of files with settings for specific installations. All of these settings files import from default.py and then override the settings they need to be different. When run, Signbank looks for settings/server_specific/server_specific.py, so you either need to rename your own settings file this, or have a symlink with this name.
  • On top of standard Linux permissions and the Django system with permissions and user groups, Signbank uses a third permission system to control who has access to which dataset, based on Django guardian. Signbank users can have read or write access to a dataset.
  • Be aware that the term 'language' is highly ambiguous within Signbank: it can refer to a sign language, the language used in the interface AND to 'translation language', ie for which spoken language a translation of a gloss is available. The translation languages are defined per dataset.
  • If logged in, the user preference is saved in the user profile. For example, if a user picks Dutch while logged in, and then logs in on another machine that is using English, Signbank will automatically switch to Dutch.
  • To serve static media (videos and images) only to users that are logged in, we use X-sendfile. At the Django side, we use the so-called protected_media view which can found under the dictionary views.

HTTPS and Java 1.6

If you are using software that is bound to Java 1.6 (or lower) and that connects to Signbank (e.g. Elan on Mac OSX, https://tla.mpi.nl/tools/tla-tools/elan/) you run into problems concerning the certificate of the HTTPS connection (using SSL/TLS).

So far attempts to solve this on the client side have been to no avail. Therefore a workaround is carried out for NGT Signbank. This involves installing a smaller prime key in the Signbank HTTPS certificate. This is described on http://httpd.apache.org/docs/current/ssl/ssl_faq.html#javadh. When using Apache, it comes down to the following:

  1. running the command openssl dhparam 1024
  2. and adding the part of the output of this command between and including the lines "BEGIN DH PARAMETERS" and "END DH PARAMETERS" to the end of the first certificate file that the Apache conf file for Signbank refers to.