Public | Automated Build

Last pushed: 2 days ago
Short Description
Export Directory
Full Description


Export Directory API service

See also:

directory-api directory-ui-buyer directory-ui-supplier directory-ui-export-readiness
directory-sso directory-sso-proxy directory-sso-profile

For more information on installation please check the Developers Onboarding Checklist


Docker >= 1.10
Docker Compose >= 1.8

Local installation

$ git clone
$ cd directory-api
$ make

Running with Docker

Requires all host environment variables to be set.

$ make docker_run

Run debug webserver in Docker

Provides defaults for all env vars but AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

$ make docker_debug

Run tests in Docker

$ make docker_test

Host environment variables for docker-compose

.env files will be automatically created (with based on env.json and env-postgres.json) by make docker_test, based on host environment variables with DIRECTORY_API_ prefix.


Setup debug environment

Requires locally running PostgreSQL (e.g. for the Mac)

$ make debug

Run debug webserver

$ make debug_webserver

Run debug celery beat scheduler

Requires Redis (e.g. Install and config Redis on Mac OS X via Homebrew for the Mac)

$ make debug_celery_beat_scheduler

Run debug tests

$ make debug_test

Development data

For development efficiency a dummy company can be loaded into the database from fixtures/development.json. To do this run:

$ make loaddata

To update fixtures/development.json with the current contents of the database run:

$ make dumpdata

Then check the contents of fixtures/development.json.


To make sso work locally add the following to your machine's /etc/hosts:

IP Adress URL

Then log into directory-sso via

Note in production, the directory-sso session cookie is shared with all subdomains that are on the same parent domain as directory-sso. However in development we cannot share cookies between subdomains using localhost - that would be like trying to set a cookie for .com, which is not supported by any RFC.

Therefore to make cookie sharing work in development we need the apps to be running on subdomains. Some stipulations:

  • directory-ui-supplier and directory-sso must both be running on sibling subdomains (with same parent domain)
  • directory-sso must be told to target cookies at the parent domain.

Manage commands

Create registered company in your local environment:

cmd="create_registered_company ch_id_max_8chrs" make debug_manage

Linux setup

Linux (Fedora 27) instructions are available here

Docker Pull Command
Source Repository