diff --git a/docker/docker-compose/docker-compose.yml b/docker/docker-compose/docker-compose.yml index a2212a25..52036260 100644 --- a/docker/docker-compose/docker-compose.yml +++ b/docker/docker-compose/docker-compose.yml @@ -19,6 +19,7 @@ services: ports: - "7880:7880" environment: + - DOCSPELL_SERVER_INTERNAL__URL=http://docspell-restserver:7880 - DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET=admin123 - DOCSPELL_SERVER_AUTH_SERVER__SECRET= - DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD=dbpass diff --git a/modules/restserver/src/main/resources/reference.conf b/modules/restserver/src/main/resources/reference.conf index 961d7d46..cb60e0dd 100644 --- a/modules/restserver/src/main/resources/reference.conf +++ b/modules/restserver/src/main/resources/reference.conf @@ -15,6 +15,12 @@ docspell.server { # to some other value, the request is not inspected. 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. bind { address = "localhost" diff --git a/modules/restserver/src/main/scala/docspell/restserver/Config.scala b/modules/restserver/src/main/scala/docspell/restserver/Config.scala index 3765dc0a..6d30e1e1 100644 --- a/modules/restserver/src/main/scala/docspell/restserver/Config.scala +++ b/modules/restserver/src/main/scala/docspell/restserver/Config.scala @@ -22,6 +22,7 @@ case class Config( appName: String, appId: Ident, baseUrl: LenientUri, + internalUrl: LenientUri, bind: Config.Bind, backend: BackendConfig, auth: Login.Config, @@ -39,7 +40,7 @@ case class Config( def pubSubConfig(headerValue: Ident): PubSubConfig = PubSubConfig( appId, - baseUrl / "internal" / "pubsub", + internalUrl / "internal" / "pubsub", 100, InternalHeader.header(headerValue.id) )