Skip to content

Commit

Permalink
chatbot-rag-app: removes unnecessary parts of Docker build (#406)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
  • Loading branch information
codefromthecrypt authored Mar 4, 2025
1 parent 72835b0 commit f598877
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions example-apps/chatbot-rag-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ EXPOSE 4000
# Default to disabling instrumentation, can be overridden to false in
# docker invocations to reenable.
ENV OTEL_SDK_DISABLED=true
ENTRYPOINT [ "opentelemetry-instrument" ]

# TODO remove custom entrypoint when EDOT Python >0.7.0 is released.
RUN echo 'if [ "${OTEL_SDK_DISABLED:-true}" == "false" ]; \
then \
opentelemetry-instrument $@; \
else \
exec $@; \
fi' > entrypoint.sh
ENTRYPOINT [ "bash", "-eu", "./entrypoint.sh" ]
CMD [ "python", "api/app.py" ]
2 changes: 1 addition & 1 deletion example-apps/chatbot-rag-app/k8s-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
initContainers:
- name: create-index
image: &image ghcr.io/elastic/elasticsearch-labs/chatbot-rag-app:latest
command: &command [ "bash", "-eu", "./entrypoint.sh" ] # match image
command: &command [ "opentelemetry-instrument" ] # match image
args: [ "flask", "create-index" ]
# This recreates your configmap based on your .env file:
# kubectl create configmap chatbot-rag-app-env --from-env-file=.env
Expand Down
2 changes: 1 addition & 1 deletion example-apps/chatbot-rag-app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -531,4 +531,4 @@ opentelemetry-instrumentation-sqlalchemy==0.51b0
opentelemetry-instrumentation-system-metrics==0.51b0
opentelemetry-instrumentation-tortoiseorm==0.51b0
opentelemetry-instrumentation-urllib3==0.51b0
elastic-opentelemetry-instrumentation-openai==0.6.0
elastic-opentelemetry-instrumentation-openai==0.6.1

0 comments on commit f598877

Please sign in to comment.