dendrite/docker
Robert Swain f0890091ef docker/docker-compose.yaml: Use version 2 for broader compatibility
We are not using version 3 features.
2017-06-27 12:12:02 +02:00
..
.env docker: Add build and full compose setup 2017-06-26 14:42:54 +02:00
.gitignore docker: Add build and full compose setup 2017-06-26 14:42:54 +02:00
dendrite-config.yaml docker: Add build and full compose setup 2017-06-26 14:42:54 +02:00
docker-compose.yaml docker/docker-compose.yaml: Use version 2 for broader compatibility 2017-06-27 12:12:02 +02:00
generate-keys.sh docker/generate-keys.sh: Make certs directory if it doesn't exist 2017-06-27 12:11:03 +02:00
init-dendrite-dbs.sh docker: Add build and full compose setup 2017-06-26 14:42:54 +02:00
README.md docker/README.md: Add note about where data is stored 2017-06-26 14:50:40 +02:00

dendrite in docker

Building images

At the top level of the dendrite repository there is a docker-build.sh script that builds all necessary docker images for running the docker-compose.yaml deployment here.

Configuration

There are a few aspects to configuration of a dendrite deployment for docker-compose:

  • dendrite-config.yaml
  • certificates
  • environment variables

dendrite-config.yaml

An example dendrite-config.yaml is included here. Modify the server_name as needed but the rest should just work.

certificates

Certificates can be generated by running generate-keys.sh that is in this directory.

Environment variables

The following environment variables MUST be set when running docker-compose in order for everything to work properly:

  • POSTGRES_PASSWORD - set this to something secret

Note: COMPOSE_PROJECT_NAME is set to dendrite in the .env file in this directory so that containers will be called dendrite_<service>_1.

Running

Data directories

The docker-compose.yaml mounts $HOME/dendrite/media into the media-api-server and $HOME/dendrite/postgres into the postgres container to persist the data on the host. Adjust this as you please.

Go time - run the command!

From this directory, run POSTGRES_PASSWORD=YOURSECRET docker-compose up -d. The client-api-proxy will be exposed on https://0.0.0.0:8443 and the federation-api-proxy on https://0.0.0.0:8449.

Create accounts

Use the create-account tool and point it at postgres://postgres:$POSTGRES_PASSWORD@localhost/dendrite_account?sslmode=disable to create accounts.