Skip to content

Commit 8b807ab

Browse files
author
Alan Christie
committed
ci: Remove compile stage in CI, and whitespace in Dockerfile
1 parent 2eb4b0f commit 8b807ab

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

.github/workflows/build-dev.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ jobs:
8080
run: |
8181
pip install --requirement build-requirements.txt
8282
pre-commit run --all-files
83-
- name: Compile requirements.txt
84-
# We need to put the file in $HOME
85-
# - a simple way to ensure it's
86-
# available between steps in the same job.
87-
run: |
88-
pip install --upgrade pip
89-
pip install poetry==1.7.1
90-
poetry export --without-hashes --without dev --output requirements.txt
9183
- name: Docker build
9284
uses: docker/build-push-action@v4
9385
with:

.github/workflows/build-production.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ jobs:
127127
run: |
128128
pip install --requirement build-requirements.txt
129129
pre-commit run --all-files
130-
- name: Compile requirements.txt
131-
run: |
132-
pip install --upgrade pip
133-
pip install poetry==1.7.1
134-
poetry export --without-hashes --without dev --output requirements.txt
135130
- name: Build
136131
uses: docker/build-push-action@v4
137132
with:

.github/workflows/build-staging.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ jobs:
149149
run: |
150150
pip install --requirement build-requirements.txt
151151
pre-commit run --all-files
152-
- name: Compile requirements.txt
153-
run: |
154-
pip install --upgrade pip
155-
pip install poetry==1.7.1
156-
poetry export --without-hashes --without dev --output requirements.txt
157152
- name: Docker build
158153
uses: docker/build-push-action@v4
159154
with:

Dockerfile

-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM python:3.11.7-slim-bullseye AS python-base
22

3-
43
ENV PYTHONUNBUFFERED 1
54
ENV PYTHONDONTWRITEBYTECODE 1
65

@@ -18,24 +17,20 @@ RUN apt-get update -y && \
1817
apt-get clean && \
1918
rm -rf /var/lib/apt/lists/*
2019

21-
2220
# another stage for poetry installation. this ensures poetry won't end
2321
# up in final image where it's not needed
2422
FROM python-base AS poetry-base
2523

2624
ARG POETRY_VERSION=1.7.1
27-
2825
RUN pip install --no-cache-dir poetry==${POETRY_VERSION}
2926

3027
WORKDIR /
3128
COPY poetry.lock pyproject.toml /
3229

33-
3430
# POETRY_VIRTUALENVS_IN_PROJECT tells poetry to create the venv to
3531
# project's directory (.venv). This way the location is predictable
3632
RUN POETRY_VIRTUALENVS_IN_PROJECT=true poetry install --no-root --only main --no-directory
3733

38-
3934
# final stage. only copy the venv with installed packages and point
4035
# paths to it
4136
FROM python-base as final
@@ -45,7 +40,6 @@ COPY --from=poetry-base /.venv /.venv
4540
ENV PYTHONPATH="${PYTHONPATH}:/.venv/lib/python3.11/site-packages/"
4641
ENV PATH=/.venv/bin:$PATH
4742

48-
4943
WORKDIR /srv/logs
5044
WORKDIR /code/logs
5145
WORKDIR /code
@@ -54,7 +48,6 @@ COPY nginx.conf /etc/nginx/nginx.conf
5448
COPY django_nginx.conf /etc/nginx/sites-available/default.conf
5549
COPY proxy_params /etc/nginx/frag_proxy_params
5650

57-
5851
RUN ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled
5952

6053
COPY . ./

0 commit comments

Comments
 (0)