Skip to content

Commit 26a59db

Browse files
authored
Fully migrate to UV (#336)
* Fully migrate to UV * Fixed Dockerfile formatting
1 parent 159d906 commit 26a59db

3 files changed

Lines changed: 7 additions & 2098 deletions

File tree

backend/Dockerfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11
2-
ARG DEPENDENCY_MANAGER="uv"
1+
FROM pennlabs/django-base:11d476546bd11c7a499e0e93be8db6af035d360f-3.11
32

43
LABEL maintainer="Penn Labs"
54

65
# Install uv
76
COPY --from=ghcr.io/astral-sh/uv@sha256:2381d6aa60c326b71fd40023f921a0a3b8f91b14d5db6b90402e65a635053709 /uv /uvx /bin/
87

98
# Copy project dependencies
10-
COPY Pipfile* pyproject.toml uv.lock /app/
11-
12-
# Install dependencies using uv or pipenv depending on DEPENDENCY_MANAGER arg
13-
RUN if [ "$DEPENDENCY_MANAGER" = "uv" ]; then \
14-
uv sync --frozen --no-dev --no-install-project --python $(which python); \
15-
mv /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
16-
mv /app/.venv/bin/gunicorn /usr/local/bin/gunicorn; \
17-
else \
18-
pipenv install --system; \
19-
fi
9+
COPY pyproject.toml uv.lock /app/
10+
11+
# Install dependencies
12+
RUN uv sync --frozen --no-dev --no-install-project --python $(which python); \
13+
ln -s /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
14+
ln -s /app/.venv/bin/gunicorn /usr/local/bin/gunicorn
2015

2116
# Make installed binaries available for POSIX compliant scripts
2217
ENV PATH="/app/.venv/bin:$PATH"

backend/Pipfile

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)