Skip to content

Commit 1a3b90a

Browse files
committed
Migrate backend Docker image to uv
1 parent 0473a4e commit 1a3b90a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

backend/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11
1+
FROM pennlabs/django-base:11d476546bd11c7a499e0e93be8db6af035d360f-3.11
22

33
LABEL maintainer="Penn Labs"
44

55
# Copy project dependencies
6-
COPY Pipfile* /app/
6+
COPY pyproject.toml uv.lock /app/
77

88
# Install project dependencies
9-
RUN pipenv install --system
9+
RUN uv sync --frozen --no-dev --no-install-project --python $(which python); \
10+
ln -s /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
11+
ln -s /app/.venv/bin/gunicorn /usr/local/bin/gunicorn
12+
13+
# Make installed binaries available for POSIX compliant scripts
14+
ENV PATH="/app/.venv/bin:$PATH"
15+
16+
# Patch for scripts that use a hard-coded path to python (django-run, asgi-run)
17+
ENV PYTHONPATH="/app/.venv/lib/python3.11/site-packages/:$PYTHONPATH"
1018

1119
# Copy project files
1220
COPY . /app/

0 commit comments

Comments
 (0)