mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-27 08:41:57 -06:00
More Docker updates
This commit is contained in:
parent
f22f649a05
commit
580a256c37
|
@ -28,7 +28,7 @@ There are three sample `docker-compose` files:
|
||||||
The `docker-compose` files refer to the `/etc/dendrite` volume as where the
|
The `docker-compose` files refer to the `/etc/dendrite` volume as where the
|
||||||
runtime config should come from. The mounted folder must contain:
|
runtime config should come from. The mounted folder must contain:
|
||||||
|
|
||||||
- `dendrite.yaml` configuration file (based on the [`dendrite-config.yaml`](https://raw.githubusercontent.com/matrix-org/dendrite/master/dendrite-config.yaml)
|
- `dendrite.yaml` configuration file (from the [Docker config folder](https://github.com/matrix-org/dendrite/tree/master/build/docker/config)
|
||||||
sample in the `build/docker/config` folder of this repository.)
|
sample in the `build/docker/config` folder of this repository.)
|
||||||
- `matrix_key.pem` server key, as generated using `cmd/generate-keys`
|
- `matrix_key.pem` server key, as generated using `cmd/generate-keys`
|
||||||
- `server.crt` certificate file
|
- `server.crt` certificate file
|
||||||
|
@ -50,15 +50,9 @@ The key files will now exist in your current working directory, and can be mount
|
||||||
|
|
||||||
## Starting Dendrite as a monolith deployment
|
## Starting Dendrite as a monolith deployment
|
||||||
|
|
||||||
Create your config based on the [`dendrite-config.yaml`](https://raw.githubusercontent.com/matrix-org/dendrite/master/dendrite-config.yaml) configuration file in the `build/docker/config` folder of this repository. And rename the config file to `dendrite.yml` (and put it in your `config` directory).
|
Create your config based on the [`dendrite.yaml`](https://github.com/matrix-org/dendrite/tree/master/build/docker/config) configuration file in the `build/docker/config` folder of this repository.
|
||||||
|
|
||||||
Once in place, start the PostgreSQL dependency:
|
Then start the deployment:
|
||||||
|
|
||||||
```
|
|
||||||
docker-compose -f docker-compose.deps.yml up postgres
|
|
||||||
```
|
|
||||||
|
|
||||||
Wait a few seconds for PostgreSQL to finish starting up, and then start a monolith:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose -f docker-compose.monolith.yml up
|
docker-compose -f docker-compose.monolith.yml up
|
||||||
|
@ -66,15 +60,9 @@ docker-compose -f docker-compose.monolith.yml up
|
||||||
|
|
||||||
## Starting Dendrite as a polylith deployment
|
## Starting Dendrite as a polylith deployment
|
||||||
|
|
||||||
Create your config based on the [`dendrite-config.yaml`](https://raw.githubusercontent.com/matrix-org/dendrite/master/dendrite-config.yaml) configuration file in the `build/docker/config` folder of this repository. And rename the config file to `dendrite.yml` (and put it in your `config` directory).
|
Create your config based on the [`dendrite-config.yaml`](https://github.com/matrix-org/dendrite/tree/master/build/docker/config) configuration file in the `build/docker/config` folder of this repository.
|
||||||
|
|
||||||
Once in place, start all the dependencies:
|
Then start the deployment:
|
||||||
|
|
||||||
```
|
|
||||||
docker-compose -f docker-compose.deps.yml up
|
|
||||||
```
|
|
||||||
|
|
||||||
Wait a few seconds for PostgreSQL and Kafka to finish starting up, and then start a polylith:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose -f docker-compose.polylith.yml up
|
docker-compose -f docker-compose.polylith.yml up
|
||||||
|
|
|
@ -265,6 +265,19 @@ media_api:
|
||||||
height: 480
|
height: 480
|
||||||
method: scale
|
method: scale
|
||||||
|
|
||||||
|
# Configuration for experimental MSC's
|
||||||
|
mscs:
|
||||||
|
# A list of enabled MSC's
|
||||||
|
# Currently valid values are:
|
||||||
|
# - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
|
||||||
|
# - msc2946 (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
|
||||||
|
mscs: []
|
||||||
|
database:
|
||||||
|
connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_mscs?sslmode=disable
|
||||||
|
max_open_conns: 5
|
||||||
|
max_idle_conns: 2
|
||||||
|
conn_max_lifetime: -1
|
||||||
|
|
||||||
# Configuration for the Room Server.
|
# Configuration for the Room Server.
|
||||||
room_server:
|
room_server:
|
||||||
internal_api:
|
internal_api:
|
||||||
|
|
|
@ -12,6 +12,11 @@ services:
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: itsasecret
|
POSTGRES_PASSWORD: itsasecret
|
||||||
POSTGRES_USER: dendrite
|
POSTGRES_USER: dendrite
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U dendrite"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
|
@ -32,6 +37,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|
|
@ -12,6 +12,11 @@ services:
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: itsasecret
|
POSTGRES_PASSWORD: itsasecret
|
||||||
POSTGRES_USER: dendrite
|
POSTGRES_USER: dendrite
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U dendrite"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
|
@ -40,6 +45,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
media_api:
|
media_api:
|
||||||
hostname: media_api
|
hostname: media_api
|
||||||
|
@ -50,6 +56,7 @@ services:
|
||||||
- ./media:/var/dendrite/media
|
- ./media:/var/dendrite/media
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
sync_api:
|
sync_api:
|
||||||
hostname: sync_api
|
hostname: sync_api
|
||||||
|
@ -62,6 +69,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
room_server:
|
room_server:
|
||||||
hostname: room_server
|
hostname: room_server
|
||||||
|
@ -74,6 +82,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
edu_server:
|
edu_server:
|
||||||
hostname: edu_server
|
hostname: edu_server
|
||||||
|
@ -85,6 +94,7 @@ services:
|
||||||
- jetstream
|
- jetstream
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
federation_api:
|
federation_api:
|
||||||
hostname: federation_api
|
hostname: federation_api
|
||||||
|
@ -97,6 +107,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
key_server:
|
key_server:
|
||||||
hostname: key_server
|
hostname: key_server
|
||||||
|
@ -109,6 +120,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
user_api:
|
user_api:
|
||||||
hostname: user_api
|
hostname: user_api
|
||||||
|
@ -121,6 +133,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
appservice_api:
|
appservice_api:
|
||||||
hostname: appservice_api
|
hostname: appservice_api
|
||||||
|
@ -135,6 +148,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
- room_server
|
- room_server
|
||||||
- user_api
|
- user_api
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
for db in userapi_accounts userapi_devices mediaapi syncapi roomserver keyserver federationapi appservice naffka; do
|
for db in userapi_accounts userapi_devices mediaapi syncapi roomserver keyserver federationapi appservice mscs; do
|
||||||
createdb -U dendrite -O dendrite dendrite_$db
|
createdb -U dendrite -O dendrite dendrite_$db
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue