mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-29 09:41:57 -06:00
Add appservices component to docker scripts (#1153)
Signed-off-by: Ashley Nelson <amn@fantashley.com>
This commit is contained in:
parent
7f26b0cd13
commit
61e0482fef
|
@ -118,6 +118,7 @@ listen:
|
|||
edu_server: "edu_server:7777"
|
||||
key_server: "key_server:7779"
|
||||
user_api: "user_api:7780"
|
||||
appservice_api: "appservice_api:7781"
|
||||
|
||||
# The configuration for tracing the dendrite components.
|
||||
tracing:
|
||||
|
|
|
@ -163,6 +163,20 @@ services:
|
|||
networks:
|
||||
- internal
|
||||
|
||||
appservice_api:
|
||||
hostname: appservice_api
|
||||
image: matrixdotorg/dendrite:appservice
|
||||
command: [
|
||||
"--config=dendrite.yaml"
|
||||
]
|
||||
volumes:
|
||||
- ./config:/etc/dendrite
|
||||
networks:
|
||||
- internal
|
||||
depends_on:
|
||||
- room_server
|
||||
- user_api
|
||||
|
||||
networks:
|
||||
internal:
|
||||
attachable: true
|
||||
|
|
|
@ -6,6 +6,7 @@ docker build -f build/docker/Dockerfile -t matrixdotorg/dendrite:latest .
|
|||
|
||||
docker build -t matrixdotorg/dendrite:monolith --build-arg component=dendrite-monolith-server -f build/docker/Dockerfile.component .
|
||||
|
||||
docker build -t matrixdotorg/dendrite:appservice --build-arg component=dendrite-appservice-server -f build/docker/Dockerfile.component .
|
||||
docker build -t matrixdotorg/dendrite:clientapi --build-arg component=dendrite-client-api-server -f build/docker/Dockerfile.component .
|
||||
docker build -t matrixdotorg/dendrite:clientproxy --build-arg component=client-api-proxy -f build/docker/Dockerfile.component .
|
||||
docker build -t matrixdotorg/dendrite:eduserver --build-arg component=dendrite-edu-server -f build/docker/Dockerfile.component .
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
docker pull matrixdotorg/dendrite:monolith
|
||||
|
||||
docker pull matrixdotorg/dendrite:appservice
|
||||
docker pull matrixdotorg/dendrite:clientapi
|
||||
docker pull matrixdotorg/dendrite:clientproxy
|
||||
docker pull matrixdotorg/dendrite:eduserver
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
docker push matrixdotorg/dendrite:monolith
|
||||
|
||||
docker push matrixdotorg/dendrite:appservice
|
||||
docker push matrixdotorg/dendrite:clientapi
|
||||
docker push matrixdotorg/dendrite:clientproxy
|
||||
docker push matrixdotorg/dendrite:eduserver
|
||||
|
|
|
@ -10,7 +10,7 @@ set -eu
|
|||
echo "Checking that it builds..."
|
||||
go build ./cmd/...
|
||||
|
||||
./scripts/find-lint.sh
|
||||
./build/scripts/find-lint.sh
|
||||
|
||||
echo "Testing..."
|
||||
go test -v ./...
|
||||
|
|
35
cmd/dendrite-user-api-server/main.go
Normal file
35
cmd/dendrite-user-api-server/main.go
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2017 Vector Creations Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/matrix-org/dendrite/internal/setup"
|
||||
"github.com/matrix-org/dendrite/userapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg := setup.ParseFlags(false)
|
||||
base := setup.NewBaseDendrite(cfg, "UserAPI", true)
|
||||
defer base.Close() // nolint: errcheck
|
||||
|
||||
accountDB := base.CreateAccountsDB()
|
||||
deviceDB := base.CreateDeviceDB()
|
||||
|
||||
userAPI := userapi.NewInternalAPI(accountDB, deviceDB, cfg.Matrix.ServerName, cfg.Derived.ApplicationServices)
|
||||
|
||||
userapi.AddInternalRoutes(base.InternalAPIMux, userAPI)
|
||||
|
||||
base.SetupAndServeHTTP(string(base.Cfg.Bind.UserAPI), string(base.Cfg.Listen.UserAPI))
|
||||
}
|
Loading…
Reference in a new issue