-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (22 loc) · 686 Bytes
/
Dockerfile
File metadata and controls
37 lines (22 loc) · 686 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
30
31
32
33
34
35
36
37
FROM node:slim
WORKDIR /app
COPY ui/package.json ui/package-lock.json ui/tsconfig.json /app/
RUN npm install
COPY ui/src /app/src
COPY ui/public /app/public
ENV REACT_APP_INV_API=""
ENV REACT_APP_BASE_PATH=""
RUN npm run build
FROM python:3.12-slim
RUN apt-get update
ENV RUNNING_IN_DOCKER=true
RUN apt-get install --no-install-suggests --no-install-recommends --yes pipx
ENV PATH="/root/.local/bin:${PATH}"
RUN pipx install poetry
WORKDIR /app
COPY poetry.lock pyproject.toml README.md ./
COPY electronic_inv_sys ./electronic_inv_sys
RUN poetry install --only main
COPY --from=0 /app/build /app/
EXPOSE 8000
CMD ["poetry", "run", "fastapi", "run", "electronic_inv_sys"]