Skip to content

Commit

Permalink
Switch Docker File to Cloud Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jan 20, 2023
1 parent 09fd783 commit 00de38c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/seal-solr-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<br />
<br />

The `SolrAdapter` write the documents into a [Apache Solr](https://github.com/apache/solr) server instance.
The `SolrAdapter` write the documents into a [Apache Solr](https://github.com/apache/solr) server instance. The Apache Solr server is running in the [`cloud mode`](https://solr.apache.org/guide/solr/latest/getting-started/tutorial-solrcloud.html) as we require to use collections for indexes.

> **Note**:
> This is part of the `schranz-search/schranz-search` project create issues in the [main repository](https://github.com/schranz-search/schranz-search).
Expand All @@ -34,7 +34,7 @@ use Solr\Client;
use Schranz\Search\SEAL\Adapter\Solr\SolrAdapter;
use Schranz\Search\SEAL\Engine;

$client = new Client('http://127.0.0.1:7700');
$client = new Client('http://127.0.0.1:8983');

$engine = new Engine(
new SolrAdapter($client),
Expand Down
20 changes: 16 additions & 4 deletions packages/seal-solr-adapter/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
version: '3'
services:
solr:
image: solr:9
image: "solr:9"
ports:
- "8983:8983"
- "9983:9983"
command: solr -f -cloud
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:8983 || exit 1"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- solr-data:/var/solr
command:
- solr-precreate
- gettingstarted

zookeeper:
image: "solr:9"
depends_on:
- "solr"
network_mode: "service:solr"
command: bash -c "set -x; export; wait-for-solr.sh; solr zk -z localhost:9983 upconfig -n default -d /opt/solr/server/solr/configsets/_default; tail -f /dev/null"

volumes:
solr-data:

0 comments on commit 00de38c

Please sign in to comment.