dockware
Search…
Elasticsearch
How to use Elasticsearch?
Elasticsearch is a full-text, distributed NoSQL database for big data. It has amazing options for real-time searching and data analyzing. Shopware recommends the usage of Elasticsearch for large data sets of products. They also support in its search engine for better search results. Here is a sample of a docker setup that adds a new Elasticsearch instance to your Docker network. Just add the container and make sure its on the same network.
docker-compose.yml
1
version: "3"
2
3
services:
4
5
shopware:
6
image: dockware/play:latest
7
container_name: shopware
8
ports:
9
- "80:80"
10
networks:
11
- web
12
13
elasticsearch:
14
image: elasticsearch:7.5.2
15
container_name: elasticsearch
16
networks:
17
- web
18
environment:
19
- "EA_JAVA_OPTS=-Xms512m -Xms512m"
20
- discovery.type=single-node
21
22
networks:
23
web:
24
external: false
Copied!
Now make sure you configure the Elasticsearch instance to be used.
Add the following to your ".env" file:
.env (partial)
1
SHOPWARE_ES_HOSTS=elasticsearch:9200
2
SHOPWARE_ES_ENABLED=1
3
SHOPWARE_ES_INDEXING_ENABLED=1
4
SHOPWARE_ES_INDEX_PREFIX=abc
Copied!
Last modified 8mo ago
Copy link