Lego settings

Lego has a few settings. The defaults is placed in lego/settings/

  • SITE: Default project owner settings.
  • API_VERSION: Current api version used by default.
  • LOGIN_REDIRECT_URL: The redirect after a login. This is by default the api root.

Production settings

Production reads configuration values form ENV variables.


We use Docker in production and manages our services with Kubernetes. The Docker image in not currently public available, but you can build and distribute it by yourself.

git clone
cd lego
docker build . -t webkom/lego:latest


Lego consists of many services, each with different responsibilities and scaling possibilities.

Service Command Multiple instances
API server uwsgi –ini lego.ini Yes
Celery Beat celery -A lego beat No
Celery Worker celery -A lego worker Yes
Restricted Mail python restricted_email Yes
Websocket Server daphne lego.asgi:application -b Yes

Lego also depends on multiple external services:

  • Postgres - Database
  • Redis - Cache, Celery broker and Websocket queue
  • Elasticsearch - Search backend
  • S3 / Minio - Filestorage
  • Thumbor - Image resizer
  • LDAP (Optional) - Sync users to an external system
  • Google GSuite (Optional) - Email provider