2024-09-20 13:39:12 +00:00
|
|
|
FROM python:3.12.3
|
2024-02-07 11:17:07 +00:00
|
|
|
|
2024-07-27 22:30:15 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2024-09-20 13:39:12 +00:00
|
|
|
|
2024-09-25 09:34:38 +00:00
|
|
|
ENV POETRY_NO_INTERACTION=1 \
|
|
|
|
|
POETRY_CACHE_DIR=/tmp/poetry_cache
|
|
|
|
|
# POETRY_VIRTUALENVS_IN_PROJECT=1 \
|
|
|
|
|
# POETRY_VIRTUALENVS_CREATE=true \
|
|
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=~/.cache/pip pip install poetry && poetry config virtualenvs.create false
|
2024-07-27 22:30:15 +00:00
|
|
|
|
2024-02-07 11:17:07 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
2024-09-25 09:34:38 +00:00
|
|
|
RUN --mount=type=cache,target=~/.cache/pip pip install wheel Cython
|
2024-02-07 11:17:07 +00:00
|
|
|
|
2024-07-27 16:55:13 +00:00
|
|
|
COPY ./rl_string_helper ./rl_string_helper
|
2024-09-25 09:34:38 +00:00
|
|
|
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./rl_string_helper
|
2024-07-27 16:55:13 +00:00
|
|
|
|
|
|
|
|
COPY ./database-lib ./database-lib
|
2024-09-25 09:34:38 +00:00
|
|
|
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./database-lib
|
2024-07-27 16:55:13 +00:00
|
|
|
|
2024-09-21 11:09:30 +00:00
|
|
|
COPY ./medium-parser ./medium-parser
|
2024-09-25 09:34:38 +00:00
|
|
|
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./medium-parser
|
2024-02-07 11:17:07 +00:00
|
|
|
|
2024-09-20 13:39:12 +00:00
|
|
|
COPY ./web ./web
|
2024-07-27 16:55:13 +00:00
|
|
|
|
2024-09-20 13:39:12 +00:00
|
|
|
WORKDIR /app/web
|
2024-07-27 16:55:13 +00:00
|
|
|
|
2024-09-25 09:34:38 +00:00
|
|
|
RUN --mount=type=cache,target=/tmp/poetry_cache poetry install --without dev --only main --no-ansi
|
2024-02-07 11:17:07 +00:00
|
|
|
|
2024-09-25 10:56:47 +00:00
|
|
|
RUN apt install -y curl
|
|
|
|
|
|
|
|
|
|
RUN useradd -m freedium
|
|
|
|
|
USER freedium
|
2024-02-07 11:17:07 +00:00
|
|
|
|
2024-07-27 22:30:15 +00:00
|
|
|
CMD ["python3", "-m", "server", "server"]
|