mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 13:38:33 +03:00
refactors from pipenv to poetry
This commit is contained in:
@@ -7,14 +7,23 @@ WORKDIR /aa-api
|
||||
RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
|
||||
sh get-docker.sh
|
||||
# set environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV LANG=C.UTF-8 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
POETRY_VIRTUALENVS_IN_PROJECT=1 \
|
||||
POETRY_VIRTUALENVS_CREATE=1
|
||||
|
||||
# install dependencies
|
||||
RUN apt update -y && \
|
||||
apt install -y python3-venv && \
|
||||
python3 -m venv ./poetry-venv && \
|
||||
./poetry-venv/bin/python -m pip install --upgrade pip && \
|
||||
./poetry-venv/bin/python -m pip install "poetry>=2.0.0,<3.0.0"
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
RUN ./poetry-venv/bin/poetry install --without dev --no-root --no-cache
|
||||
|
||||
# install dependencies
|
||||
RUN pip install --upgrade pip && \
|
||||
apt-get update
|
||||
COPY ./Pipfile* ./
|
||||
RUN pipenv install
|
||||
|
||||
# copy source code and .env files over
|
||||
COPY alembic.ini ./
|
||||
@@ -22,4 +31,4 @@ COPY .env* ./app/
|
||||
COPY ./secrets/ ./secrets/
|
||||
COPY ./app/ ./app/
|
||||
|
||||
ENTRYPOINT ["pipenv", "run"]
|
||||
ENTRYPOINT ["./poetry-venv/bin/poetry", "run"]
|
||||
Reference in New Issue
Block a user