forked from elastic/elasticsearch-labs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 754 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:22-alpine AS build-step
WORKDIR /app
ENV PATH=/node_modules/.bin:$PATH
COPY frontend ./frontend
RUN cd frontend && yarn install
RUN cd frontend && REACT_APP_API_HOST=/api yarn build
# Use glibc-based image to get pre-compiled wheels for grpcio and tiktoken
FROM python:3.12-slim
WORKDIR /app
RUN mkdir -p ./frontend/build
COPY --from=build-step ./app/frontend/build ./frontend/build
COPY requirements.txt ./requirements.txt
RUN pip3 install -r ./requirements.txt
RUN mkdir -p ./api ./data
COPY api ./api
COPY data ./data
EXPOSE 4000
# Default to disabling instrumentation, can be overridden to false in
# docker invocations to reenable.
ENV OTEL_SDK_DISABLED=true
ENTRYPOINT [ "opentelemetry-instrument" ]
CMD [ "python", "api/app.py" ]