mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-25 16:23:43 +03:00
moved poetry install to pip
This commit is contained in:
parent
6c1da495db
commit
49ffd7317b
|
@ -19,6 +19,7 @@ ENV PYTHONUNBUFFERED 1
|
|||
ENV DRAWIO_VERSION 15.7.3
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV BUILD_ENV ${BUILD_ENVIRONMENT}
|
||||
ENV POETRY_VERSION 1.4.2
|
||||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
|
@ -30,16 +31,15 @@ RUN apt-get update && \
|
|||
apt-get purge -y --auto-remove -o APT:AutoRemove:RecommendsImportant=false && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
# Dependencies for file preview generation
|
||||
# RUN curl -LO https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-x86_64-${DRAWIO_VERSION}.AppImage && mv drawio-x86_64-${DRAWIO_VERSION}.AppImage /usr/local/bin/drawio
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
RUN pip install "poetry==$POETRY_VERSION"
|
||||
RUN python -m venv /venv
|
||||
|
||||
RUN poetry config virtualenvs.create false
|
||||
COPY pyproject.toml poetry.lock /app/
|
||||
RUN poetry export -f requirements.txt | /venv/bin/pip install -r /dev/stdin
|
||||
|
||||
COPY . .
|
||||
RUN poetry build && /venv/bin/pip install dist/*.whl
|
||||
|
||||
COPY ./pyproject.toml ./poetry.lock /app/
|
||||
RUN poetry install --no-root --only main
|
||||
RUN preview --check-dependencies
|
||||
|
||||
COPY ./compose/production/django/entrypoint /entrypoint
|
||||
RUN sed -i 's/\r$//g' /entrypoint
|
||||
|
|
|
@ -44,14 +44,14 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
RUN pip install poetry
|
||||
RUN pip install "poetry==$POETRY_VERSION"
|
||||
RUN python -m venv /venv
|
||||
|
||||
# Configuring poetry
|
||||
RUN poetry config virtualenvs.create false
|
||||
COPY pyproject.toml poetry.lock /
|
||||
COPY pyproject.toml poetry.lock /app/
|
||||
RUN poetry export -f requirements.txt | /venv/bin/pip install -r /dev/stdin
|
||||
|
||||
# Installing requirements
|
||||
RUN poetry install
|
||||
COPY . .
|
||||
RUN poetry build && /venv/bin/pip install dist/*.whl
|
||||
|
||||
COPY --chown=django:django ./compose/production/django/entrypoint /entrypoint
|
||||
RUN sed -i 's/\r$//g' /entrypoint
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
. /venv/bin/activate
|
||||
|
||||
|
||||
|
||||
# N.B. If only .env files supported variable expansion...
|
||||
|
|
Loading…
Reference in New Issue
Block a user