Add Application Service and documentation
This commit is contained in:
parent
1191bda431
commit
5e6f23aab4
@ -1,2 +1,3 @@
|
||||
REGISTRATION_SHARED_SECRET='look in your synapses homeserver.yaml'
|
||||
AS_TOKEN='look in the app-service.yaml'
|
||||
EXCLUDED_USERS='rocket.cat' # Comma-separated list of usernames or IDs
|
||||
|
||||
26
README.md
26
README.md
@ -14,13 +14,15 @@ mongoexport --collection=users --db=rocketchat --out=users.json
|
||||
|
||||
Export them to `inputs/`
|
||||
|
||||
## Running the Matrix Dev Server
|
||||
## Configuring the Matrix Dev Server
|
||||
|
||||
Generate a Synapse homeserver config with the following command (you might change `my.matrix.host` for the actual server name, as it can't be changed afterwards):
|
||||
|
||||
```shell
|
||||
docker-compose run --rm -e SYNAPSE_SERVER_NAME=my.matrix.host -e SYNAPSE_REPORT_STATS=no synapse generate
|
||||
```
|
||||
|
||||
To run the script without hitting rate limiting, you SHOULD add the following options to the freshly generated `files/homeserver.yaml`. **Do not leave these in the production setup!**
|
||||
To run the script without hitting rate limiting and activating an *Application Service* to send messages by different users with our desired timestamps, you MUST add the following options to the freshly generated `files/homeserver.yaml`. **Do not leave these in the production setup!**
|
||||
|
||||
```yaml
|
||||
rc_joins:
|
||||
@ -43,9 +45,17 @@ rc_invites:
|
||||
per_issuer:
|
||||
per_second: 1024
|
||||
burst_count: 2048
|
||||
app_service_config_files:
|
||||
- /data/app-service.yaml
|
||||
```
|
||||
|
||||
Continue setting up the server:
|
||||
Now edit `app-service.example.yaml` and save it at `files/app-service.yaml`, changing the tokens.
|
||||
|
||||
Copy over `.env.example` to `.env` and insert your values.
|
||||
|
||||
## Starting the Matrix Dev Server
|
||||
|
||||
Boot up the container and (for the first time starting the server or after resetting it manually) create an admin user:
|
||||
|
||||
```shell
|
||||
docker-compose up -d
|
||||
@ -65,12 +75,12 @@ curl --request POST \
|
||||
> src/config/synapse_access_token.json
|
||||
```
|
||||
|
||||
## Installing and Running the Script
|
||||
|
||||
Install NodeJS and npm on your system, install the script's dependencies via `npm install`.
|
||||
|
||||
To finally run the script, execute it via `npm start`.
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy over `.env.example` to `.env` and insert your values.
|
||||
|
||||
## Running Tests
|
||||
|
||||
`npm test`.
|
||||
@ -85,7 +95,7 @@ sudo rm files/homeserver.db
|
||||
rm db.sqlite
|
||||
```
|
||||
|
||||
Then you can restart with an empty but quite equal server, following the instructions above, excluding the `generate` command.
|
||||
Then you can restart with an empty but quite equal server, following the instructions above to start the dev server.
|
||||
|
||||
## Design Decisions
|
||||
|
||||
|
||||
9
app-service.example.yaml
Normal file
9
app-service.example.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
id: "rc2matrix migration"
|
||||
url: "http://127.0.0.1:1234"
|
||||
as_token: "30c05ae90a248a4188e620216fa72e349803310ec83e2a77b34fe90be6081f46" # Change me to something different and random
|
||||
hs_token: "312df522183efd404ec1cd22d2ffa4bbc76a8c1ccf541dd692eef281356bb74e" # Change me to something different and random
|
||||
sender_localpart: "_rc_migration_bot"
|
||||
namespaces:
|
||||
users:
|
||||
- exclusive: false
|
||||
regex: "@.*"
|
||||
Loading…
Reference in New Issue
Block a user