-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDOCKER-183: Fix Solr remote url property #31
Open
acotiuga
wants to merge
2
commits into
xwiki:master
Choose a base branch
from
acotiuga:XDOCKER-183
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,18 +423,18 @@ From the [XWiki Solr Search API documentation](https://extensions.xwiki.org/xwik | |
> | ||
> You can also find more Solr-specific performance details on https://wiki.apache.org/solr/SolrPerformanceProblems. Standalone Solr also comes with a very nice UI, along with monitoring and test tools. | ||
|
||
This image provides the configuration parameters `INDEX_HOST` and `INDEX_PORT` which are used to configure `xwiki.properties` with: | ||
This image provides the configuration parameters `INDEX_BASEURL` and `INDEX_TYPE` which are used to configure `xwiki.properties` with: | ||
|
||
```data | ||
solr.type=remote | ||
solr.remote.url=http://$INDEX_HOST:$INDEX_PORT/solr/xwiki | ||
solr.type=$INDEX_TYPE | ||
solr.remote.baseURL=$INDEX_BASEURL | ||
``` | ||
|
||
#### Preparing Solr container | ||
|
||
The simplest way to create an external Solr service is using the [official Solr image](https://hub.docker.com/_/solr/). | ||
|
||
- Select the appropriate XWiki Solr configuration JAR from [here](https://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-search-solr-server-data/) (Note: it's usually better to synchronize it with your version of XWiki) | ||
- Select the appropriate XWiki Solr configuration JAR from [here](https://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-search-solr-server-core/) (Note: it's usually better to synchronize it with your version of XWiki) | ||
- Place this JAR in a directory along side `solr-init.sh` that you can fetch from the [docker-xwiki repository](https://github.com/xwiki-contrib/docker-xwiki/tree/master/contrib/solr) | ||
- Ensure that this directory is owned by the Solr user and group `chown -R 8983:8983 /path/to/solr/init/directory` | ||
- Launch the Solr container and mount this directory at `/docker-entrypoint-initdb.d` | ||
|
@@ -456,7 +456,7 @@ docker run \ | |
-d solr:7.2 | ||
``` | ||
|
||
Then start the XWiki container, the below command is nearly identical to that specified in the Starting XWiki section above, except that it includes the `-e INDEX_HOST=` environment variable which specifies the hostname of the Solr container. | ||
Then start the XWiki container, the below command is nearly identical to that specified in the Starting XWiki section above, except that it includes the `-e INDEX_BASEURL=` environment variable which specifies the baseURL of the Solr container. | ||
|
||
```console | ||
docker run \ | ||
|
@@ -468,7 +468,7 @@ docker run \ | |
-e DB_PASSWORD=xwiki \ | ||
-e DB_DATABASE=xwiki \ | ||
-e DB_HOST=mysql-xwiki \ | ||
-e INDEX_HOST=solr-xwiki \ | ||
-e INDEX_BASEURL=http://localhost:8983/solr/xwiki \ | ||
-d xwiki:lts-mysql-tomcat | ||
``` | ||
|
||
|
@@ -496,7 +496,7 @@ services: | |
- DB_PASSWORD=xwiki | ||
- DB_DATABASE=xwiki | ||
- DB_HOST=xwiki-db | ||
- INDEX_HOST=xwiki-index | ||
- INDEX_BASEURL=http://localhost:8983/solr/xwiki | ||
volumes: | ||
- xwiki-data:/usr/local/xwiki | ||
networks: | ||
|
@@ -586,8 +586,7 @@ The first time you create a container out of the xwiki image, a shell script (`/ | |
- `DB_PASSWORD`: The user password used by XWiki to read/write to the DB. | ||
- `DB_DATABASE`: The name of the XWiki database to use/create. | ||
- `DB_HOST`: The name of the host (or docker container) containing the database. Default is "db". | ||
- `INDEX_HOST`: The hostname of an externally configured Solr instance. Defaults to "localhost", and configures an embedded Solr instance. | ||
- `INDEX_PORT`: The port used by an externally configured Solr instance. Defaults to 8983. | ||
- `INDEX_BASEURL`: The base URL of an externally configured Solr instance. Defaults to "http://localhost:8983/solr/xwiki", and configures an embedded Solr instance | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would fail the official dockerhub image best practices. It requires a tab. |
||
- `CONTEXT_PATH`: The name of the context path under which XWiki will be deployed in Tomcat. If not specified then it'll be deployed as ROOT. | ||
- If you had set this environment property and later on, recreate the XWiki container without passing it (i.e you wish to deploy XWiki as ROOT again), the you'll need to edit the `xwiki.cfg` file in your mapped local permanent directory and set `xwiki.webapppath=`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why we need "INDEX_TYPE". Couldn't INDEX_BASEURL be an empty string by default and use that as criteria for example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually forget that I'm fine with that since it's simply about following the standard configuration and someone might introduce a new type at some point.