Running EDD

This page is a quick reference for commonly helpful commands for running or developing EDD. Many of the commands use Docker Compose and other related Docker tools that aren’t fully documented here.

Docker services

docker compose is the recommended tool for controlling EDD services on a single Docker node. The docker-compose.yml file defines the list of services as top-level entries under the services line. To run in a Swarm, use docker stack deploy.

For quick reference, the provided services are:

  • http: WSGI server that runs the EDD webapp
  • websocket: ASGI server that runs asynchronous parts of EDD
  • worker: long-running and background tasks are run here with Celery

These services are required to have EDD function, and can be launched with EDD or run separately:

  • postgres: provides EDD’s database
  • redis: provides the cache back-end for EDD
  • solr: provides a search index for EDD
  • rabbitmq: messaging bus that supports Celery
  • smtp: mail server that supports emails from EDD

These additional services may be included as well:

  • ice: strain registry used to track information on strains used in experiments
  • nginx: webserver that proxies clients’ HTTP requests to other Docker services
  • nginx-gen: monitors container start/stop events to generate configs for nginx
  • letsencrypt: generates TLS certificates for nginx through the Let’s Encrypt service

While edd is running, you can also get a list of its services by runnning docker compose ps or docker stack ps [NAME]. Each container will be listed in the “Name” column of the output, with a name generated by Docker.

docker compose commands

docker stack and docker service commands

Running multiple copies of EDD

If running multiple copies of EDD on one host or Swarm, prefer using the Swarm deployment method and give each deployed stack a unique name. To avoid clashing with open ports, launch Nginx separately and configure the different EDD instances with different VIRTUAL_HOST environments.

Determining the local URL for EDD’s web interfaces

If using a Linux host or Docker for Mac, use the hostname edd.lvh.me.

  • EDD: http://edd.lvh.me/
  • EDD’s REST API: http://edd.lvh.me/rest/
  • Solr: http://solr.lvh.me/ (if configured in docker-compose.override.yml)
  • RabbitMQ Management Plugin: http://rabbitmq.lvh.me/ (if configured in docker-compose.override.yml)

Interfacing with EDD’s services from the command line

Run commands in existing containers with:

docker compose exec $SERVICE $COMMAND

As an example, this will open a Python REPL with Django setup:

docker compose exec http /code/manage.py shell

Restart misbehaving services with:

docker compose restart $SERVICE