forked from redis-developer/redis-product-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (23 loc) · 771 Bytes
/
Dockerfile
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
30
31
32
33
34
35
36
37
FROM node:18.8-alpine AS ReactImage
WORKDIR /app/gui
ENV NODE_PATH=/app/gui/node_modules
ENV PATH=$PATH:/app/gui/node_modules/.bin
COPY ./gui/package.json ./
RUN yarn install --no-optional
ADD ./gui ./
RUN yarn build
FROM python:3.8-slim-buster AS ApiImage
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
RUN python3 -m pip install --upgrade pip setuptools wheel
WORKDIR /app/
COPY ./data/ ./data
RUN mkdir -p /app/backend
WORKDIR /app/backend
COPY ./app/ .
RUN pip install -e .
# add static react files to fastapi image
COPY --from=ReactImage /app/gui/build /app/backend/vecsim_app/templates/build
LABEL org.opencontainers.image.source https://github.com/RedisVentures/redis-product-search
WORKDIR /app/backend/vecsim_app
CMD ["sh", "./entrypoint.sh"]