Skip to content

Commit fbfe731

Browse files
re-uses docker setup in chatbot-rag-app and openai-embeddings examples (#378)
Signed-off-by: Adrian Cole <[email protected]>
1 parent e3432ce commit fbfe731

File tree

4 files changed

+17
-211
lines changed

4 files changed

+17
-211
lines changed

example-apps/chatbot-rag-app/README.md

+7-25
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,12 @@ Copy [env.example](env.example) to `.env` and fill in values noted inside.
2222
## Installing and connecting to Elasticsearch
2323

2424
There are a number of ways to install Elasticsearch. Cloud is best for most
25-
use-cases. Visit the [Install Elasticsearch](https://www.elastic.co/search-labs/tutorials/install-elasticsearch) for more information.
25+
use-cases. We also have [docker-compose-elastic.yml](../../docker), that starts
26+
Elasticsearch, Kibana, and APM Server on your laptop with one command.
2627

2728
Once you decided your approach, edit your `.env` file accordingly.
2829

29-
### Running your own Elastic Stack with Docker
30-
31-
If you'd like to start Elastic locally, you can use the provided
32-
[docker-compose-elastic.yml](docker-compose-elastic.yml) file. This starts
33-
Elasticsearch, Kibana, and APM Server and only requires Docker installed.
34-
35-
Use docker compose to run Elastic stack in the background:
36-
37-
```bash
38-
docker compose -f docker-compose-elastic.yml up --force-recreate -d
39-
```
40-
41-
Then, you can view Kibana at http://localhost:5601/app/home#/
42-
43-
If asked for a username and password, use username: elastic and password: elastic.
44-
45-
Clean up when finished, like this:
46-
47-
```bash
48-
docker compose -f docker-compose-elastic.yml down
49-
```
30+
For more information, visit our [Install Elasticsearch][install-es] tutorial.
5031

5132
## Connecting to LLM
5233

@@ -147,9 +128,9 @@ If you set `OTEL_SDK_DISABLED=false` in your `.env` file, the app will send
147128
logs, metrics and traces to an OpenTelemetry compatible endpoint.
148129

149130
[env.example](env.example) defaults to use Elastic APM server, started by
150-
[docker-compose-elastic.yml](docker-compose-elastic.yml). If you start your
151-
Elastic stack this way, you can access Kibana like this, authenticating with
152-
the username "elastic" and password "elastic":
131+
[docker-compose-elastic.yml](../../docker). If you start your Elastic stack
132+
this way, you can access Kibana like this, authenticating with the username
133+
"elastic" and password "elastic":
153134

154135
http://localhost:5601/app/apm/traces?rangeFrom=now-15m&rangeTo=now
155136

@@ -201,3 +182,4 @@ See [Langchain documentation][loader-docs] for more ways to load documents.
201182

202183
---
203184
[loader-docs]: https://python.langchain.com/docs/how_to/#document-loaders
185+
[install-es]: https://www.elastic.co/search-labs/tutorials/install-elasticsearch

example-apps/chatbot-rag-app/docker-compose-elastic.yml

-91
This file was deleted.

example-apps/openai-embeddings/README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ Copy [env.example](env.example) to `.env` and fill in values noted inside.
3030
## Installing and connecting to Elasticsearch
3131

3232
There are a number of ways to install Elasticsearch. Cloud is best for most
33-
use-cases. Visit the [Install Elasticsearch](https://www.elastic.co/search-labs/tutorials/install-elasticsearch) for more information.
33+
use-cases. We also have [docker-compose-elastic.yml](../../docker), that starts
34+
Elasticsearch, Kibana, and APM Server on your laptop with one command.
3435

3536
Once you decided your approach, edit your `.env` file accordingly.
3637

38+
For more information, visit our [Install Elasticsearch][install-es] tutorial.
39+
3740
### Running your own Elastic Stack with Docker
3841

3942
If you'd like to start Elastic locally, you can use the provided
@@ -115,9 +118,9 @@ If you set `OTEL_SDK_DISABLED=false` in your `.env` file, the app will send
115118
logs, metrics and traces to an OpenTelemetry compatible endpoint.
116119

117120
[env.example](env.example) defaults to use Elastic APM server, started by
118-
[docker-compose-elastic.yml](docker-compose-elastic.yml). If you start your
119-
Elastic stack this way, you can access Kibana like this, authenticating with
120-
the username "elastic" and password "elastic":
121+
[docker-compose-elastic.yml](../../docker). If you start your Elastic stack
122+
this way, you can access Kibana like this, authenticating with the username
123+
"elastic" and password "elastic":
121124

122125
http://localhost:5601/app/apm/traces?rangeFrom=now-15m&rangeTo=now
123126

@@ -144,3 +147,6 @@ EDOT Node.js [here](https://github.com/elastic/elastic-otel-node).
144147

145148
- Modify the initialization of `elasticsearchClient` in [utils.js](utils.js)
146149
- Refer to [this document](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-connecting.html)
150+
151+
---
152+
[install-es]: https://www.elastic.co/search-labs/tutorials/install-elasticsearch

example-apps/openai-embeddings/docker-compose-elastic.yml

-91
This file was deleted.

0 commit comments

Comments
 (0)