Skip to content

Commit f956a8c

Browse files
authored
Docs restructure (element-hq#2953)
Needs to be merged into `gh-pages` later on.
1 parent 11b5570 commit f956a8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+447
-855
lines changed

.github/workflows/helm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ jobs:
3838
with:
3939
config: helm/cr.yaml
4040
charts_dir: helm/
41+
mark_as_latest: false

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ It intends to provide an **efficient**, **reliable** and **scalable** alternativ
1313

1414
Dendrite is **beta** software, which means:
1515

16-
- Dendrite is ready for early adopters. We recommend running in Monolith mode with a PostgreSQL database.
16+
- Dendrite is ready for early adopters. We recommend running Dendrite with a PostgreSQL database.
1717
- Dendrite has periodic releases. We intend to release new versions as we fix bugs and land significant features.
1818
- Dendrite supports database schema upgrades between releases. This means you should never lose your messages when upgrading Dendrite.
1919

2020
This does not mean:
2121

2222
- Dendrite is bug-free. It has not yet been battle-tested in the real world and so will be error prone initially.
2323
- Dendrite is feature-complete. There may be client or federation APIs that are not implemented.
24-
- Dendrite is ready for massive homeserver deployments. There is no sharding of microservices (although it is possible to run them on separate machines) and there is no high-availability/clustering support.
24+
- Dendrite is ready for massive homeserver deployments. There is no high-availability/clustering support.
2525

2626
Currently, we expect Dendrite to function well for small (10s/100s of users) homeserver deployments as well as P2P Matrix nodes in-browser or on mobile devices.
2727

@@ -60,7 +60,7 @@ The following instructions are enough to get Dendrite started as a non-federatin
6060
```bash
6161
$ git clone https://github.com/matrix-org/dendrite
6262
$ cd dendrite
63-
$ ./build.sh
63+
$ go build -o bin/ ./cmd/...
6464

6565
# Generate a Matrix signing key for federation (required)
6666
$ ./bin/generate-keys --private-key matrix_key.pem
@@ -85,7 +85,7 @@ Then point your favourite Matrix client at `http://localhost:8008` or `https://l
8585

8686
## Progress
8787

88-
We use a script called Are We Synapse Yet which checks Sytest compliance rates. Sytest is a black-box homeserver
88+
We use a script called "Are We Synapse Yet" which checks Sytest compliance rates. Sytest is a black-box homeserver
8989
test rig with around 900 tests. The script works out how many of these tests are passing on Dendrite and it
9090
updates with CI. As of January 2023, we have 100% server-server parity with Synapse, and the client-server parity is at 93% , though check
9191
CI for the latest numbers. In practice, this means you can communicate locally and via federation with Synapse

build.cmd

-51
This file was deleted.

build.sh

-24
This file was deleted.

build/docker/README.md

+7-10
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,20 @@ They can be found on Docker Hub:
66

77
- [matrixdotorg/dendrite-monolith](https://hub.docker.com/r/matrixdotorg/dendrite-monolith) for monolith deployments
88

9-
## Dockerfiles
9+
## Dockerfile
1010

11-
The `Dockerfile` is a multistage file which can build all four Dendrite
12-
images depending on the supplied `--target`. From the root of the Dendrite
11+
The `Dockerfile` is a multistage file which can build Dendrite. From the root of the Dendrite
1312
repository, run:
1413

1514
```
16-
docker build . --target monolith -t matrixdotorg/dendrite-monolith
17-
docker build . --target demo-pinecone -t matrixdotorg/dendrite-demo-pinecone
18-
docker build . --target demo-yggdrasil -t matrixdotorg/dendrite-demo-yggdrasil
15+
docker build . -t matrixdotorg/dendrite-monolith
1916
```
2017

21-
## Compose files
18+
## Compose file
2219

23-
There are two sample `docker-compose` files:
20+
There is one sample `docker-compose` files:
2421

25-
- `docker-compose.monolith.yml` which runs a monolith Dendrite deployment
22+
- `docker-compose.yml` which runs a Dendrite deployment with Postgres
2623

2724
## Configuration
2825

@@ -55,7 +52,7 @@ Create your config based on the [`dendrite-sample.yaml`](https://github.com/matr
5552
Then start the deployment:
5653

5754
```
58-
docker-compose -f docker-compose.monolith.yml up
55+
docker-compose -f docker-compose.yml up
5956
```
6057

6158
## Building the images

build/docker/docker-compose.monolith.yml

-44
This file was deleted.

build/docker/docker-compose.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: "3.4"
2+
3+
services:
4+
postgres:
5+
hostname: postgres
6+
image: postgres:15-alpine
7+
restart: always
8+
volumes:
9+
# This will create a docker volume to persist the database files in.
10+
# If you prefer those files to be outside of docker, you'll need to change this.
11+
- dendrite_postgres_data:/var/lib/postgresql/data
12+
environment:
13+
POSTGRES_PASSWORD: itsasecret
14+
POSTGRES_USER: dendrite
15+
POSTGRES_DATABASE: dendrite
16+
healthcheck:
17+
test: ["CMD-SHELL", "pg_isready -U dendrite"]
18+
interval: 5s
19+
timeout: 5s
20+
retries: 5
21+
networks:
22+
- internal
23+
24+
monolith:
25+
hostname: monolith
26+
image: matrixdotorg/dendrite-monolith:latest
27+
ports:
28+
- 8008:8008
29+
- 8448:8448
30+
volumes:
31+
- ./config:/etc/dendrite
32+
# The following volumes use docker volumes, change this
33+
# if you prefer to have those files outside of docker.
34+
- dendrite_media:/var/dendrite/media
35+
- dendrite_jetstream:/var/dendrite/jetstream
36+
- dendrite_search_index:/var/dendrite/searchindex
37+
depends_on:
38+
postgres:
39+
condition: service_healthy
40+
networks:
41+
- internal
42+
restart: unless-stopped
43+
44+
networks:
45+
internal:
46+
attachable: true
47+
48+
volumes:
49+
dendrite_postgres_data:
50+
dendrite_media:
51+
dendrite_jetstream:
52+
dendrite_search_index:

build/docker/postgres/create_db.sh

-5
This file was deleted.

clientapi/admin_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ func TestPurgeRoom(t *testing.T) {
133133
cfg, processCtx, close := testrig.CreateConfig(t, dbType)
134134
caches := caching.NewRistrettoCache(128*1024*1024, time.Hour, caching.DisableMetrics)
135135
natsInstance := jetstream.NATSInstance{}
136-
defer close()
136+
defer func() {
137+
// give components the time to process purge requests
138+
time.Sleep(time.Millisecond * 50)
139+
close()
140+
}()
137141

138142
routers := httputil.NewRouters()
139143
cm := sqlutil.NewConnectionManager(processCtx, cfg.Global.DatabaseOptions)

clientapi/routing/admin.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ func AdminResetPassword(req *http.Request, cfg *config.ClientAPI, device *api.De
123123
}
124124
}
125125
request := struct {
126-
Password string `json:"password"`
126+
Password string `json:"password"`
127+
LogoutDevices bool `json:"logout_devices"`
127128
}{}
128129
if err = json.NewDecoder(req.Body).Decode(&request); err != nil {
129130
return util.JSONResponse{
@@ -146,7 +147,7 @@ func AdminResetPassword(req *http.Request, cfg *config.ClientAPI, device *api.De
146147
Localpart: localpart,
147148
ServerName: serverName,
148149
Password: request.Password,
149-
LogoutDevices: true,
150+
LogoutDevices: request.LogoutDevices,
150151
}
151152
updateRes := &api.PerformPasswordUpdateResponse{}
152153
if err := userAPI.PerformPasswordUpdate(req.Context(), updateReq, updateRes); err != nil {

dendrite-sample.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ global:
6969
# e.g. localhost:443
7070
well_known_server_name: ""
7171

72-
# The server name to delegate client-server communications to, with optional port
73-
# e.g. localhost:443
72+
# The base URL to delegate client-server communications to e.g. https://localhost
7473
well_known_client_name: ""
7574

7675
# Lists of domains that the server will trust as identity servers to verify third

docs/FAQ.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ No, although a good portion of the Matrix specification has been implemented. Mo
2424

2525
Dendrite development is currently supported by a small team of developers and due to those limited resources, the majority of the effort is focused on getting Dendrite to be
2626
specification complete. If there are major features you're requesting (e.g. new administration endpoints), we'd like to strongly encourage you to join the community in supporting
27-
the development efforts through [contributing](https://matrix-org.github.io/dendrite/development/contributing).
27+
the development efforts through [contributing](../development/contributing).
2828

2929
## Is there a migration path from Synapse to Dendrite?
3030

@@ -103,7 +103,7 @@ This can be done by performing a room upgrade. Use the command `/upgraderoom <ve
103103

104104
## How do I reset somebody's password on my server?
105105

106-
Use the admin endpoint [resetpassword](https://matrix-org.github.io/dendrite/administration/adminapi#post-_dendriteadminresetpassworduserid)
106+
Use the admin endpoint [resetpassword](./administration/adminapi#post-_dendriteadminresetpassworduserid)
107107

108108
## Should I use PostgreSQL or SQLite for my databases?
109109

@@ -157,7 +157,7 @@ You may need to revisit the connection limit of your PostgreSQL server and/or ma
157157

158158
## VOIP and Video Calls don't appear to work on Dendrite
159159

160-
There is likely an issue with your STUN/TURN configuration on the server. If you believe your configuration to be correct, please see the [troubleshooting](administration/5_troubleshooting.md) for troubleshooting recommendations.
160+
There is likely an issue with your STUN/TURN configuration on the server. If you believe your configuration to be correct, please see the [troubleshooting](administration/6_troubleshooting.md) for troubleshooting recommendations.
161161

162162
## What is being reported when enabling phone-home statistics?
163163

docs/INSTALL.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ or alternatively, in the [installation](installation/) folder:
66

77
1. [Planning your deployment](installation/1_planning.md)
88
2. [Setting up the domain](installation/2_domainname.md)
9-
3. [Preparing database storage](installation/3_database.md)
10-
4. [Generating signing keys](installation/4_signingkey.md)
11-
5. [Installing as a monolith](installation/5_install_monolith.md)
12-
6. [Populate the configuration](installation/7_configuration.md)
13-
7. [Starting the monolith](installation/8_starting_monolith.md)
9+
3. [Installing Dendrite](installation/manual/1_build.md)
10+
4. [Preparing database storage](installation/manual/2_database.md)
11+
5. [Populate the configuration](installation/manual/3_configuration.md)
12+
6. [Generating signing keys](installation/manual/4_signingkey.md)
13+
7. [Starting Dendrite](installation/manual/5_starting_dendrite.md)

docs/administration/1_createusers.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ User accounts can be created on a Dendrite instance in a number of ways.
1111

1212
## From the command line
1313

14-
The `create-account` tool is built in the `bin` folder when building Dendrite with
15-
the `build.sh` script.
14+
The `create-account` tool is built in the `bin` folder when [building](../installation/build) Dendrite.
1615

17-
It uses the `dendrite.yaml` configuration file to connect to a running Dendrite instance and requires
16+
It uses the `dendrite.yaml` configuration file to connect to a **running** Dendrite instance and requires
1817
shared secret registration to be enabled as explained below.
1918

2019
An example of using `create-account` to create a **normal account**:

0 commit comments

Comments
 (0)