Skip to content

Commit 1d25c9a

Browse files
fix(ci): Docker and Poetry 2 compatibility for CI/CD
- Dockerfile: use python:3.12-slim-bookworm (3.12-rc-slim-buster deprecated) - Dockerfile + workflows: poetry install --no-dev → --only main (Poetry 2) - deploy-vm.yml: add missing space between docker build-arg options Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4c5898b commit 1d25c9a

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run: |
5353
python -m pip install --upgrade pip
5454
pip install poetry
55-
poetry install --no-dev
55+
poetry install --only main
5656
- name: Run Tests
5757
env:
5858
TEST: 1

.github/workflows/deploy-bare-metal.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: |
5252
python -m pip install --upgrade pip
5353
pip install poetry
54-
poetry install --no-dev
54+
poetry install --only main
5555
- name: Run Tests
5656
env:
5757
TEST: 1
@@ -123,7 +123,7 @@ jobs:
123123
cd app
124124
python3 -m pip install --upgrade pip
125125
pip install poetry
126-
poetry install --no-dev
126+
poetry install --only main
127127
echo -e "~~~~~~~~~~~~~~~~~~~~~~~~ Installed python requirements successfully ~~~~~~~~~~~~~~~~~~~~~~~~\n"
128128
129129
poetry run python3 manage.py migrate

.github/workflows/deploy-vm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
python -m pip install --upgrade pip
6262
pip install poetry
63-
poetry install --no-dev
63+
poetry install --only main
6464
- name: Run Tests
6565
env:
6666
TEST: 1
@@ -76,7 +76,7 @@ jobs:
7676
- uses: actions/checkout@v4
7777
- name: Run tests
7878
run: |
79-
docker build . --build-arg AUTH_TOKEN=${{ secrets.AUTH_KEY }}--build-arg ALLOWED_HOSTS=${{ secrets.ALLOWED_HOSTS }} --file Dockerfile
79+
docker build . --build-arg AUTH_TOKEN=${{ secrets.AUTH_KEY }} --build-arg ALLOWED_HOSTS=${{ secrets.ALLOWED_HOSTS }} --file Dockerfile
8080
8181
# Push image to GitHub Packages.
8282
# See also https://docs.docker.com/docker-hub/builds/

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN cd frontend \
1212
&& pnpm run build
1313

1414
# Build backend
15-
FROM python:3.12-rc-slim-buster
15+
FROM python:3.12-slim-bookworm
1616
WORKDIR /usr/src/app
1717
ARG ALLOWED_HOSTS
1818
ENV ALLOWED_HOSTS $ALLOWED_HOSTS
@@ -26,4 +26,4 @@ RUN pip install --upgrade pip
2626
RUN pip install poetry
2727
COPY ./pyproject.toml /usr/src/app/pyproject.toml
2828
COPY ./poetry.lock /usr/src/app/poetry.lock
29-
RUN poetry install --no-dev
29+
RUN poetry install --only main

0 commit comments

Comments
 (0)