EIG Single User Dashboard (SUD) - the Department for International Trade (DIT) service for managing EIG profiles.
For more information on installation please check the Developers Onboarding Checklist
We use SASS CSS pre-compiler. If you're doing front-end work your local machine will also need the following dependencies:
Running locally with Docker
This requires all host environment variables to be set.
$ make docker_run
Run debug webserver in Docker
$ make docker_debug
Run tests in Docker
$ make docker_test
Host environment variables for docker-compose
.env files will be automatically created (with
env_writer.py based on
make docker_test, based on host environment variables with
Running locally without Docker
$ git clone https://github.com/uktrade/directory-sso-profile $ cd directory-sso-profile $ virtualenv .venv -p python3.5 $ source .venv/bin/activate $ pip install -r requirements_test.txt
Running the webserver
$ source .venv/bin/activate $ make debug_webserver
Running the tests
$ make debug_test
If you're doing front-end development work you will need to be able to compile the SASS to CSS. For this you need:
$ npm install $ gulp
We add compiled CSS files to version control. This will sometimes result in conflicts if multiple developers are working on the same SASS files. However, by adding the compiled CSS to version control we avoid having to install node, npm, node-sass, etc to non-development machines.
You should not edit CSS files directly, instead edit their SCSS counterparts.
Signed cookies are used as the session backend to avoid using a database. We therefore must avoid storing non-trivial data in the session, because the browser will be exposed to the data.
To make sso work locally add the following to your machine's
Then log into
sso.trade.great:8004, and use
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-ssomust both be running on sibling subdomains (with same parent domain)
directory-ssomust be told to target cookies at the parent domain.