Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 3.66 KB

README.md

File metadata and controls

72 lines (52 loc) · 3.66 KB

Docker containers for Indico

Pipeline Status

Production-like setup

Important

The Docker configuration described here is provided as is and might require further modifications depending on your system. Note that, we do not use this setup ourselves so it is not as battle-tested as one of our official installation guides. We are happy to provide guidance if needed, but a good working knowledge of Docker is recommended.

Quickstart

Before starting the containers, set a SECRET_KEY in the indico-prod/indico.conf file. You can generate one by running the following snippet from the terminal:

python -c 'import os; print(repr(os.urandom(32)))'

Once this is done, start the containers with:

$ cd indico-prod && docker compose up

Indico will be accessible at localhost:8080. You can also access the wsgi app directly at localhost:9090 which skips the nginx proxy. If you do this, make sure to update BASE_URL in the indico-prod/indico.conf file.

Configuration

There are a couple config files which you can use to configure this setup.

  • indico-prod/.env - This file specifies general settings like the DB config, nginx port and the path to indico.conf.
  • indico-prod/indico.conf - This is a sample Indico config file. It is passed to the containers as a read-only volume. Feel free to modify it based on your needs. You can use a different config file by changing the INDICO_CONFIG variable in indico-prod/.env.
  • indico-prod/logging.yaml - The default logging config for Indico. Feel free to modify it or use a different config by changing the INDICO_LOGGING_CONFIG variable.

The production setup contains the following containers:

  • indico-web - Indico running behind uwsgi (accessible at localhost:9090)
  • indico-celery - Indico celery task runner
  • indico-celery-beat - celery beat
  • indico-redis - redis
  • indico-nginx - nginx proxy (by default accessible at localhost:8080, can be changed by updating NGINX_PORT)

indico-web uses the getindico/indico image that we publish to Dockerhub. You can build this image locally using the build_latest.sh script. The image pulls the latest Indico release from PyPI together with the indico-plugins package. You can use the indico.conf file to specify which plugins you want to enable.

Different setups

If you don't need the DB and the nginx proxy, you can just run:

$ docker compose up indico-web

This will bring up only Indico, celery and redis. The DB should be on the same network to be accessible.

The getindico/indico image can also be used completely standalone outside of this docker-compose setup, as long as the remaining services (postgres, redis, celery) are available elsewhere. In that case, make sure to update REDIS_CACHE_URL, CELERY_BROKER in your indico.conf and the DB connection settings in prod.env.

This is how you can run Indico on its own:

$ docker run \
    type=bind,src=/path/to/indico.conf,target=/opt/indico/etc/indico.conf \
    getindico/indico /opt/indico/run_indico.sh

Or to run celery from the same image:

$ docker run \
    type=bind,src=/path/to/indico.conf,target=/opt/indico/etc/indico.conf \
    getindico/indico /opt/indico/run_celery.sh

In the above, we omit the network setup to make e.g. the DB accessible from the containers.