Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
python-version: ["3.10"]
poetry-version: [1.3.2]
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.11]
python-version: ["3.10", "3.11"]
poetry-version: [1.3.2]
steps:
- name: Checkout repository
Expand Down
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
FROM duffn/python-poetry:3.9-bullseye
FROM python:3.11-slim

# Install git
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list && \
apt-get update && \
apt-get install -y -t bullseye-backports git
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*

# Install poetry using pip
ENV POETRY_VERSION=1.7.1 \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1
RUN pip install --no-cache-dir poetry==${POETRY_VERSION}

# Set up entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Install dependencies
COPY pyproject.toml poetry.lock ./
# Poetry is installed with `pip`, so active our virtual environmennt and install projects dependecies there, so they don't conflict with poetry's dependencies.
RUN . $VENV_PATH/bin/activate && $POETRY_HOME/poetry install --no-root
RUN poetry install --no-root

WORKDIR /app
COPY . .

# Install the app
RUN . $VENV_PATH/bin/activate && $POETRY_HOME/poetry install
RUN poetry install

# Run the app
CMD ["/entrypoint.sh"]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ This folder contains various files and folders related to automating tasks and w

### [`Dockerfile`](https://github.com/irgolic/AutoPR/blob/1d818f4daeb78662b7d831d89a73d3258bb95e2f/./Dockerfile)

🏗️ Sets up a Docker image based on the `duffn/python-poetry:3.9-bullseye` image
🔧 Installs git from the bullseye-backports repository
🏗️ Sets up a Docker image based on the official `python:3.11-slim` image
🔧 Installs git from the default repository
📦 Installs Poetry 1.7.1 for dependency management
📥 Copies an entrypoint script and makes it executable
📥 Copies the `pyproject.toml` and `poetry.lock` files
🔧 Activates the virtual environment and installs the project dependencies using Poetry
🔧 Installs the project dependencies using Poetry
📥 Copies the rest of the files to the `/app` directory
🔧 Installs the application using Poetry
🚀 Sets the entrypoint to `/entrypoint.sh` for running the app
Expand Down
Loading
Loading