Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Feb 20, 2025
1 parent 3873ccd commit 15eef38
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/docker-chatbot-rag-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
branches:
- main
paths:
# Verify changes to the Dockerfile on PRs
# Verify changes to the Dockerfile on PRs, tainted when we update ES.
- docker/docker-compose-elastic.yml
- example-apps/chatbot-rag-app/docker-compose.yml
- example-apps/chatbot-rag-app/Dockerfile
- .github/workflows/docker-chatbot-rag-app.yml
- '!**/*.md'
Expand Down Expand Up @@ -49,6 +51,15 @@ jobs:
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name == 'push' && 'true' || 'false' }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: start elasticsearch
if: github.event_name == 'pull_request'
run: docker-compose -f docker/docker-compose-elastic.yml elasticsearch up -d --wait
- name: test image using index creation
if: github.event_name == 'pull_request'
working-directory: example-apps/chatbot-rag-app
run: |
cp env.example .env
docker-compose run --rm -T create-index
- name: export digest
if: github.event_name == 'push'
run: |
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ wget https://raw.githubusercontent.com/elastic/elasticsearch-labs/refs/heads/mai
Use docker compose to run Elastic stack in the background:

```bash
docker compose -f docker-compose-elastic.yml up --force-recreate -d
docker compose -f docker-compose-elastic.yml up --force-recreate --wait -d
```

Then, you can view Kibana at http://localhost:5601/app/home#/
Expand Down
13 changes: 7 additions & 6 deletions docker/docker-compose-elastic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: elastic-stack

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.2
container_name: elasticsearch
ports:
- 9200:9200
Expand All @@ -16,8 +16,9 @@ services:
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- xpack.license.self_generated.type=trial
# Use minimum heap required by ELSER
- ES_JAVA_OPTS=-Xms2g -Xmx2g
# Note that ELSER is recommended to have 2GB, but it is JNI (PyTorch).
# So, ELSER's memory is in addition to the heap and other overhead.
- ES_JAVA_OPTS=-Xms1g -Xmx1g
ulimits:
memlock:
soft: -1
Expand All @@ -37,7 +38,7 @@ services:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.2
container_name: elasticsearch_settings
restart: 'no'
command: >
Expand All @@ -49,7 +50,7 @@ services:
'
kibana:
image: docker.elastic.co/kibana/kibana:8.17.0
image: docker.elastic.co/kibana/kibana:8.17.2
container_name: kibana
depends_on:
elasticsearch_settings:
Expand All @@ -73,7 +74,7 @@ services:
interval: 1s

apm-server:
image: docker.elastic.co/apm/apm-server:8.17.0
image: docker.elastic.co/apm/apm-server:8.17.2
container_name: apm-server
depends_on:
elasticsearch:
Expand Down
4 changes: 2 additions & 2 deletions example-apps/chatbot-rag-app/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: chatbot-rag-app

services:
create-index:
image: ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app
image: ${IMAGE:-ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app}
build:
context: .
container_name: create-index
Expand All @@ -21,7 +21,7 @@ services:
create-index:
condition: service_completed_successfully
container_name: api-frontend
image: ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app
image: ${IMAGE:-ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app}
build:
context: .
env_file:
Expand Down

0 comments on commit 15eef38

Please sign in to comment.