allmende / docker-matrix

docker composition of images for a Matrix home server with Riot interface and coturn
https://riot.allmende.io
4 stars 1 forks source link

Introduction

Dockerfile for installation of matrix open federated Instant Messaging and VoIP communication server.

Configuration

To configure run the image with "generate" as argument. You have to setup the server domain and a /data-directory. After this you have to edit the generated homeserver.yaml file. Don't forget to configure the vector.im.conf file if you need the vector.im web client. Rename this file to deactivate vector.im

To get the things done, "generate" will create a own self-signed certificate.

This needs to be changed for production usage.

Example:

$ docker run -v /tmp/data:/data --rm -e SERVER_NAME=localhost silviof/docker-matrix generate

Start

For starting you need the port bindings and a mapping for the /data-directory.

$ docker run -d -p 8448:8448 -p 3478:3478 -v /tmp/data:/data silviof/docker-matrix start

Port configurations

This following ports are used in the container. You can use -p-option on docker run to configure this part (eg.: -p 443:8448).

Version information

To get the installed synapse version you can run the image with version as argument or look at the container via cat.

$ docker run -ti --rm silviof/docker-matrix version
-=> Matrix Version: v0.7.1-0-g894a89d
# docker exec -it CONTAINERID cat /synapse.version
v0.7.1-0-g894a89d

Environment variables

build specific arguments

For building of synapse version v0.11.0-rc2 and vector with commit a9fc47e add --build-arg BV_SYN=v0.11.0-rc2 --build-arg BV_VEC=a9fc47efd77 to the docker build command.

Exported volumes


Composing

You can also generate the example configuration into /srv/matrix/example with

docker-compose -f generate.yml up

Then run the turnserver and matrix with

docker-compose -d up

Debugging the images happens with

docker-compose down

To debug the environments instead of the source images, use

docker-compose stop
docker-compose rm

instead.

Migration

Create the database container first and start it, attached to the desired network. Then run the migration with

docker-compose -f generate.yml run --rm migrate