-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (23 loc) · 816 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
38
39
FROM python:3.10.3-slim-buster as build-backend
RUN apt-get update && \
apt-get -y install gcc libmariadb-dev
RUN python -m pip install --upgrade pip
RUN pip install poetry
WORKDIR /app/backend
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
COPY backend/pyproject.toml backend/poetry.lock ./
# RUN poetry config virtualenvs.create true
RUN poetry install --no-dev
COPY backend/app ./app
FROM node:latest as build-frontend
WORKDIR /app/frontend
COPY frontend/package.json frontend/*.config.js frontend/index.html ./
RUN npm install
COPY frontend/src src/
COPY frontend/public public/
RUN npm run build
FROM nginx/unit:1.26.1-python3.10
WORKDIR /app
COPY --from=build-backend /app/backend backend
COPY --from=build-frontend /app/frontend/dist frontend
COPY docker/config.json /docker-entrypoint.d/config.json