From 555b6fa0d534ac897b139ee1e57a651e50e1aec5 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 27 Jun 2019 13:52:40 +0100 Subject: Docker image: Add a migrate_config mode (#5567) ... to help people escape env var hell --- docker/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index 7f7d27ed33..b62417c281 100644 --- a/docker/README.md +++ b/docker/README.md @@ -112,3 +112,19 @@ For backwards-compatibility only, the docker image supports creating a dynamic configuration file based on environment variables. This is now deprecated, but is enabled when the `SYNAPSE_SERVER_NAME` variable is set (and `generate` is not given). + +To migrate from a dynamic configuration file to a static one, run the docker +container once with the environment variables set, and `migrate_config` +commandline option. For example: + +``` +docker run -it --rm \ + --mount type=volume,src=synapse-data,dst=/data \ + -e SYNAPSE_SERVER_NAME=my.matrix.host \ + -e SYNAPSE_REPORT_STATS=yes \ + matrixdotorg/synapse:latest migrate_config +``` + +This will generate the same configuration file as the legacy mode used, but +will store it in `/data/homeserver.yaml` instead of a temporary location. You +can then use it as shown above at [Running synapse](#running-synapse). -- cgit 1.4.1