2024-05-09 06:27:45 +00:00
|
|
|
FROM python:3.11-alpine as backend
|
2024-05-06 20:19:18 +00:00
|
|
|
|
|
|
|
RUN apk update \
|
|
|
|
&& apk add --no-cache \
|
|
|
|
build-base \
|
|
|
|
chromium \
|
|
|
|
gcc \
|
|
|
|
libc-dev \
|
|
|
|
linux-headers \
|
|
|
|
pipx \
|
|
|
|
python3-dev \
|
|
|
|
&& pipx install poetry
|
|
|
|
|
|
|
|
ENV PATH=/root/.local/bin:${PATH}
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
COPY pyproject.toml poetry.lock /app
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
RUN poetry --version
|
|
|
|
RUN /root/.local/bin/poetry install
|
|
|
|
|
|
|
|
|
|
|
|
#CMD ["poetry", "run", "gunicorn", "--bind=0.0.0.0:8080", "--reload", "app:app"]
|
|
|
|
CMD ["poetry", "run", "flask", "--app", "api", "run", "--host=0.0.0.0", "--port=8080", "--debug"]
|