Docker for QA

The following describes how to get a pre-built instance of Normandy for testing. This is not suitable for development, or serving traffic on the public internet.


This guide assumes you have already installed and set up the following:

  1. Docker
  2. Docker Compose

Getting the code

We’ll be using Docker Compose to run Normandy and the needed services. The repository normandy-compose contains the docker-compose.yml file to describe a Normandy system.

$ git clone
$ cd normandy-compose

Starting the server, and initial setup

  1. Generate keys to use for SSL.

    $ ./bin/
  2. Start everything, in the background. This downloads Docker images if needed.

    $ docker-compose up -d
  3. Setup the database schema, and needed data

    $ docker-compose run normandy ./ migrate
    $ docker-compose run normandy ./ update_actions
    $ docker-compose run normandy ./ initial_data
    $ docker-compose run normandy ./ createsuperuser
  4. Open the site. If you are using Docker Machine, get your VM’s IP with docker-machine ip. Otherwise, use localhost. A full URL (on Linux) is: https://localhost:8443/control. Accept the self-signed certificate.

  5. When finished, shut everything down.

    $ docker-compose stop

    This will preserve all data used by the containers. In the future, follow step 2 again to start the servers.


Any customization of the server should be done by editing docker-compose.yml.

Using a different version of Normandy

To use a different version of Normandy (or any other Docker image in the group) Normandy, change the line image: mozilla/normandy:latest to image: mozilla/normandy:v6.

Changing configuration options

Normandy is configured through environment variables, which can be set by editing services.normandy.environment. For example, to change the time that recipes are cached for, add a line DJANGO_CACHES_RECIPE_TIME: 5 in the environment section.

Configuring Firefox

Any reference to localhost should be replaced with the IP where Docker is actually running. When using Docker Machine, this is the output of docker-machine ip.


The URL that the add-on will fetch recipes from. Set this to https://localhost:8443/api/v1 to use the local Normandy.

Note that this value must start with https, otherwise the add-on will reject it.


Hash of the root key use for signing recipes. If you are testing against a local development server (using normandy-compose as mentioned above), you must set this to:


If you are testing against the production Normandy server, leave this set to its default value.