kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Add optional Elasticsearch service (#88)
rodzic
9fd8f98c7c
commit
31d7990e13
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ build: ## Build the backend Docker image
|
|||
docker compose build web
|
||||
|
||||
start: ## Bring the backend Docker container up
|
||||
docker compose up
|
||||
docker compose up web
|
||||
|
||||
stop: ## Stop the backend Docker container
|
||||
docker compose stop
|
||||
|
|
12
README.md
12
README.md
|
@ -38,7 +38,7 @@ Once the build is complete:
|
|||
|
||||
```sh
|
||||
# 6. Start your containers and wait for them to finish their startup scripts.
|
||||
docker compose up
|
||||
docker compose up web
|
||||
```
|
||||
|
||||
You might see a message like this the first time you run your containers. This is normal because the frontend container has not finished building the assets for the Wagtail admin. Just wait a few seconds for the frontend container to finish building (you should see a message like `webpack compiled successfully in 15557 ms` and then stop and start your containers again (Ctrl+C + `docker compose up`).
|
||||
|
@ -306,3 +306,13 @@ You simply do the same operations to fork the Willow project and point your loca
|
|||
## See also
|
||||
|
||||
- [Vagrant Wagtail development](https://github.com/wagtail/vagrant-wagtail-develop)
|
||||
|
||||
## Testing with Elasticsearch
|
||||
|
||||
To test the Wagtail search with the [Elasticsearch backend](https://docs.wagtail.org/en/stable/topics/search/backends.html#elasticsearch-backend) or OpenSearch, use the additional service:
|
||||
|
||||
```sh
|
||||
docker compose up web elastic
|
||||
```
|
||||
|
||||
Then install any dependencies and configure Wagtail per the developer documentation, configuring the search backend to use `http://elastic:9200` as the URL.
|
||||
|
|
10
compose.yaml
10
compose.yaml
|
@ -47,3 +47,13 @@ services:
|
|||
command: bash -c "echo 'Copying node_modules, this may take a few minutes...' && rsync -rah --info=progress2 /node_modules /code/wagtail/ && npm run start"
|
||||
restart: "no"
|
||||
tty: true
|
||||
|
||||
elastic:
|
||||
container_name: elastic
|
||||
image: elasticsearch:8.17.1
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
environment:
|
||||
- xpack.security.enabled=false
|
||||
- discovery.type=single-node
|
||||
|
|
Ładowanie…
Reference in New Issue