Merge pull request #1181 from eikek/fixup/internal-urls

Use an internal url for the rest server to register for messages
This commit is contained in:
mergify[bot] 2021-11-17 20:41:56 +00:00 committed by GitHub
commit dce4d88b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -19,6 +19,7 @@ services:
ports: ports:
- "7880:7880" - "7880:7880"
environment: environment:
- DOCSPELL_SERVER_INTERNAL__URL=http://docspell-restserver:7880
- DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET=admin123 - DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET=admin123
- DOCSPELL_SERVER_AUTH_SERVER__SECRET= - DOCSPELL_SERVER_AUTH_SERVER__SECRET=
- DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD=dbpass - DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD=dbpass

View File

@ -15,6 +15,12 @@ docspell.server {
# to some other value, the request is not inspected. # to some other value, the request is not inspected.
base-url = "http://localhost:7880" base-url = "http://localhost:7880"
# This url is the base url for reaching this server internally.
# While you might set `base-url` to some external address (like
# mydocs.myserver.com), the `internal-url` must be set such that
# other nodes can reach this server.
internal-url = "http://localhost:7880"
# Where the server binds to. # Where the server binds to.
bind { bind {
address = "localhost" address = "localhost"

View File

@ -22,6 +22,7 @@ case class Config(
appName: String, appName: String,
appId: Ident, appId: Ident,
baseUrl: LenientUri, baseUrl: LenientUri,
internalUrl: LenientUri,
bind: Config.Bind, bind: Config.Bind,
backend: BackendConfig, backend: BackendConfig,
auth: Login.Config, auth: Login.Config,
@ -39,7 +40,7 @@ case class Config(
def pubSubConfig(headerValue: Ident): PubSubConfig = def pubSubConfig(headerValue: Ident): PubSubConfig =
PubSubConfig( PubSubConfig(
appId, appId,
baseUrl / "internal" / "pubsub", internalUrl / "internal" / "pubsub",
100, 100,
InternalHeader.header(headerValue.id) InternalHeader.header(headerValue.id)
) )