File tree 1 file changed +9
-8
lines changed
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
9
9
# Copy project dependencies
10
10
COPY Pipfile* pyproject.toml uv.lock /app/
11
11
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
14
20
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
17
21
# Make installed binaries available for POSIX compliant scripts
18
22
ENV 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
+
23
24
# Patch for scripts that use a hard-coded path to python (django-run, asgi-run)
24
25
ENV PYTHONPATH="/app/.venv/lib/python3.11/site-packages/:$PYTHONPATH"
25
26
You can’t perform that action at this time.
0 commit comments