mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
44 lines
1.6 KiB
Markdown
44 lines
1.6 KiB
Markdown
# 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.
|