aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-06-19 09:37:19 +0100
committerGitHub <noreply@github.com>2020-06-19 09:37:19 +0100
commit72444e4a4f31b70dfb7ddd875ef874f637699dce (patch)
tree6699d365837c7ba330c79a7029a4e05fbfc0058d
parent9e3d771a32059b96c5595b08bc1f13a481ca800b (diff)
User API polylith component (#1151)
* User API polylith component * Add docker-pull.sh
-rw-r--r--build/docker/config/dendrite-config.yaml1
-rw-r--r--build/docker/docker-compose.polylith.yml11
-rwxr-xr-xbuild/docker/images-build.sh1
-rwxr-xr-xbuild/docker/images-pull.sh16
-rwxr-xr-xbuild/docker/images-push.sh1
-rw-r--r--dendrite-config.yaml6
-rw-r--r--docs/INSTALL.md10
-rw-r--r--internal/config/config.go1
8 files changed, 45 insertions, 2 deletions
diff --git a/build/docker/config/dendrite-config.yaml b/build/docker/config/dendrite-config.yaml
index 26dc272a..f421b2e7 100644
--- a/build/docker/config/dendrite-config.yaml
+++ b/build/docker/config/dendrite-config.yaml
@@ -117,6 +117,7 @@ listen:
federation_sender: "federation_sender:7776"
edu_server: "edu_server:7777"
key_server: "key_server:7779"
+ user_api: "user_api:7780"
# The configuration for tracing the dendrite components.
tracing:
diff --git a/build/docker/docker-compose.polylith.yml b/build/docker/docker-compose.polylith.yml
index 17860409..af2ae4e8 100644
--- a/build/docker/docker-compose.polylith.yml
+++ b/build/docker/docker-compose.polylith.yml
@@ -152,6 +152,17 @@ services:
networks:
- internal
+ user_api:
+ hostname: user_api
+ image: matrixdotorg/dendrite:userapi
+ command: [
+ "--config=dendrite.yaml"
+ ]
+ volumes:
+ - ./config:/etc/dendrite
+ networks:
+ - internal
+
networks:
internal:
attachable: true
diff --git a/build/docker/images-build.sh b/build/docker/images-build.sh
index 6bc05896..e43d2d04 100755
--- a/build/docker/images-build.sh
+++ b/build/docker/images-build.sh
@@ -18,3 +18,4 @@ docker build -t matrixdotorg/dendrite:publicroomsapi --build-arg component=de
docker build -t matrixdotorg/dendrite:roomserver --build-arg component=dendrite-room-server -f build/docker/Dockerfile.component .
docker build -t matrixdotorg/dendrite:syncapi --build-arg component=dendrite-sync-api-server -f build/docker/Dockerfile.component .
docker build -t matrixdotorg/dendrite:serverkeyapi --build-arg component=dendrite-server-key-api-server -f build/docker/Dockerfile.component .
+docker build -t matrixdotorg/dendrite:userapi --build-arg component=dendrite-user-api-server -f build/docker/Dockerfile.component .
diff --git a/build/docker/images-pull.sh b/build/docker/images-pull.sh
new file mode 100755
index 00000000..edccf4a3
--- /dev/null
+++ b/build/docker/images-pull.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+docker pull matrixdotorg/dendrite:monolith
+
+docker pull matrixdotorg/dendrite:clientapi
+docker pull matrixdotorg/dendrite:clientproxy
+docker pull matrixdotorg/dendrite:eduserver
+docker pull matrixdotorg/dendrite:federationapi
+docker pull matrixdotorg/dendrite:federationsender
+docker pull matrixdotorg/dendrite:federationproxy
+docker pull matrixdotorg/dendrite:keyserver
+docker pull matrixdotorg/dendrite:mediaapi
+docker pull matrixdotorg/dendrite:publicroomsapi
+docker pull matrixdotorg/dendrite:roomserver
+docker pull matrixdotorg/dendrite:syncapi
+docker pull matrixdotorg/dendrite:userapi
diff --git a/build/docker/images-push.sh b/build/docker/images-push.sh
index b39d98d6..2b430387 100755
--- a/build/docker/images-push.sh
+++ b/build/docker/images-push.sh
@@ -13,3 +13,4 @@ docker push matrixdotorg/dendrite:mediaapi
docker push matrixdotorg/dendrite:publicroomsapi
docker push matrixdotorg/dendrite:roomserver
docker push matrixdotorg/dendrite:syncapi
+docker push matrixdotorg/dendrite:userapi
diff --git a/dendrite-config.yaml b/dendrite-config.yaml
index 52793cda..73bfec24 100644
--- a/dendrite-config.yaml
+++ b/dendrite-config.yaml
@@ -108,7 +108,9 @@ kafka:
output_send_to_device_event: eduServerSendToDeviceOutput
user_updates: userUpdates
-# The postgres connection configs for connecting to the databases e.g a postgres:// URI
+# The postgres connection configs for connecting to the databases, e.g.
+# for Postgres: postgres://username:password@hostname/database
+# for SQLite: file:filename.db or file:///path/to/filename.db
database:
account: "postgres://dendrite:itsasecret@localhost/dendrite_account?sslmode=disable"
device: "postgres://dendrite:itsasecret@localhost/dendrite_device?sslmode=disable"
@@ -122,7 +124,7 @@ database:
max_open_conns: 100
max_idle_conns: 2
conn_max_lifetime: -1
- # If using naffka you need to specify a naffka database
+ # If 'use_naffka: true' set above then you need to specify a naffka database
# naffka: "postgres://dendrite:itsasecret@localhost/dendrite_naffka?sslmode=disable"
# The TCP host:port pairs to bind the internal HTTP APIs to.
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 184b777d..b4c81a42 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -329,3 +329,13 @@ finished).
```bash
./bin/dendrite-key-server --config dendrite.yaml
```
+
+### User server
+
+This manages user accounts, device access tokens and user account data,
+amongst other things.
+
+```bash
+./bin/dendrite-user-api-server --config dendrite.yaml
+```
+
diff --git a/internal/config/config.go b/internal/config/config.go
index 2bd56ad9..baa82be2 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -226,6 +226,7 @@ type Dendrite struct {
ServerKeyAPI Address `yaml:"server_key_api"`
AppServiceAPI Address `yaml:"appservice_api"`
SyncAPI Address `yaml:"sync_api"`
+ UserAPI Address `yaml:"user_api"`
RoomServer Address `yaml:"room_server"`
FederationSender Address `yaml:"federation_sender"`
PublicRoomsAPI Address `yaml:"public_rooms_api"`