File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,18 @@ COPY --from=ghcr.io/astral-sh/uv@sha256:2381d6aa60c326b71fd40023f921a0a3b8f91b14
99# Copy project dependencies
1010COPY Pipfile* pyproject.toml uv.lock /app/
1111
12- # Install project dependencies using pipenv if pipenv enabled
13- RUN if [ "$DEPENDENCY_MANAGER" = "pipenv" ]; then pipenv install --system; fi
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
1420
15- # Install project dependencies if using uv if uv enabled
16- RUN if [ "$DEPENDENCY_MANAGER" = "uv" ]; then uv sync --frozen --no-dev --no-install-project --python $(which python); fi
1721# Make installed binaries available for POSIX compliant scripts
1822ENV PATH="/app/.venv/bin:$PATH"
19- # Patch for scripts that use a hard-coded path to uwsgi (django-run)
20- RUN if [ "$DEPENDENCY_MANAGER" = "uv" ]; then mv /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; fi
21- # Patch for scripts that use a hard-coded path to gunicorn (asgi-run)
22- RUN if [ "$DEPENDENCY_MANAGER" = "uv" ]; then mv /app/.venv/bin/gunicorn /usr/local/bin/gunicorn; fi
23+
2324# Patch for scripts that use a hard-coded path to python (django-run, asgi-run)
2425ENV PYTHONPATH="/app/.venv/lib/python3.11/site-packages/:$PYTHONPATH"
2526
You can’t perform that action at this time.
0 commit comments