From 8687e71c6fc6391365660f789f6bda27ae1755f1 Mon Sep 17 00:00:00 2001 From: Kim Brose Date: Tue, 22 Oct 2019 19:01:09 +0200 Subject: [PATCH 1/5] Fix grammar --- src/Main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main.ts b/src/Main.ts index 60d0b0e23..834636492 100644 --- a/src/Main.ts +++ b/src/Main.ts @@ -886,7 +886,7 @@ export class Main { teamId = await this.clientFactory.upsertTeamByToken(opts.slack_bot_token); log.info(`Found ${teamId} for token`); } catch (ex) { - log.error("Failed to action link because the token couldn't used:", ex); + log.error("Failed to action link because the token couldn't be used:", ex); throw Error("Token did not work, unable to get team"); } } From cfd935bb6cc7cd8b48f777c382105d9261c1df23 Mon Sep 17 00:00:00 2001 From: Kim Brose Date: Tue, 22 Oct 2019 22:06:01 +0200 Subject: [PATCH 2/5] add docker usage hints --- docs/getting_started.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index 274adf5ce..f5c568e01 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -8,6 +8,7 @@ the `config.sample.yaml` file. These instructions assume you are using Synapse 1.4.0+. They should work for older releases and other homeservers, but configuration may vary. +The bridge also requires a database, for more information see [datastores](datastores.md). ### From source @@ -59,6 +60,9 @@ ever stuck, you can post a question in the 3. Create a `config.yaml` file for global configuration. There is a sample one to begin with in `config/config.sample.yaml`. You should copy and edit as appropriate. The required and optional values are flagged in the config. + + If using docker, put this file in a new `config` directory which we will later + mount to the container. 4. See [datastores](datastores.md) on how to setup a database with the bridge. @@ -72,8 +76,8 @@ ever stuck, you can post a question in the or with docker: ```sh -$ docker run -v /path/to/config/:/config/ matrixdotorg/matrix-appservice-slack \ - -r -c /config/config.yaml -u "http://$HOST:$MATRIX_PORT" -f /config/slack.yaml +$ docker run --network=host -v /path/to/config/:/config/ matrixdotorg/matrix-appservice-slack \ + -r -c /config/config.yaml -u "http://$HOST:$MATRIX_PORT" -f /config/slack-registration.yaml ``` 6. Start the actual application service: @@ -81,7 +85,12 @@ $ docker run -v /path/to/config/:/config/ matrixdotorg/matrix-appservice-slack \ `$ npm start -c config.yaml -p $MATRIX_PORT` or with docker: - `$ docker run -v /path/to/config/:/config/ matrixdotorg/matrix-appservice-slack` + `$ docker run --network=host -d -v /path/to/config/:/config/ matrixdotorg/matrix-appservice-slack` + + (Note: `--network=host` will expose the container directly to the host's network, i.e. you will be able to use + localhost just as if you're running the node app. If you want to use the default network bridge mode, + you will have to configure the config files, port forwarding, firewalls and your database server to + traverse the network bridge.) 7. Copy the newly-generated `slack-registration.yaml` file to your Matrix homeserver. Add the registration file to your homeserver config (default From 240a2afa2aa2c7ba0f8e44757425089cd2e96ea9 Mon Sep 17 00:00:00 2001 From: Kim Brose Date: Tue, 22 Oct 2019 22:27:00 +0200 Subject: [PATCH 3/5] add postgresql install & config help --- docs/datastores.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/datastores.md b/docs/datastores.md index 5d6444e70..592883930 100644 --- a/docs/datastores.md +++ b/docs/datastores.md @@ -2,7 +2,10 @@ Datastores ========== Version 1.0+ supports using PostgreSQL as a storage backend instead of the -deprecated NeDB storage backend. +deprecated NeDB storage backend. +The required version of PostgreSQL is at least 9.5, but we recommend using the lastest stable version +available to you. Follow the installation instructions on the [official website](https://www.postgresql.org/download/) +or pull a [docker container](https://hub.docker.com/_/postgres). Using PostgreSQL ---------------- @@ -28,6 +31,13 @@ db: Ensure that `dbdir` is not included in the config. +Note: depending on your environment, the default PostgreSQL configuration might be set up such that it can be +reached only from localhost. Make sure it is reachable from your bridge installation. If necessary, set up +[`listen_addresses`](https://www.postgresql.org/docs/current/runtime-config-connection.html) and +[authentication](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html) for your needs. + +Remember to choose conservative options to ensure security of your database! + NeDB End-of-life -------- From 00f95a7a122959fbf419c22030795151e93549a8 Mon Sep 17 00:00:00 2001 From: Kim Brose Date: Thu, 24 Oct 2019 20:39:34 +0200 Subject: [PATCH 4/5] Add PR to changelog --- changelog.d/305.doc | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/305.doc diff --git a/changelog.d/305.doc b/changelog.d/305.doc new file mode 100644 index 000000000..fbc72015e --- /dev/null +++ b/changelog.d/305.doc @@ -0,0 +1,3 @@ +Add some documentation about PostgreSQL +Add some documentation for installing with docker +Fix typos From 06ba5263b539855a57c1cf2b78887494a0291017 Mon Sep 17 00:00:00 2001 From: Kim Brose Date: Fri, 25 Oct 2019 00:53:05 +0200 Subject: [PATCH 5/5] Update 305.doc --- changelog.d/305.doc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/changelog.d/305.doc b/changelog.d/305.doc index fbc72015e..a1cd634d3 100644 --- a/changelog.d/305.doc +++ b/changelog.d/305.doc @@ -1,3 +1 @@ -Add some documentation about PostgreSQL -Add some documentation for installing with docker -Fix typos +Add some documentation about PostgreSQL, for installing with docker, fix typos