File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 imagePullPolicy : Always
4141 command : ["/bin/sh", "-c"]
4242 args :
43- - |
44- uv sync --frozen --no-cache --link-mode=copy && \
45- cp --remove-destination "$(readlink /app{{ .Values.folder }}/.venv/bin/python)" /app{{ .Values.folder }}/.venv/bin/python 2>/dev/null || :
43+ - |
44+ if [ -f pyproject.toml ]; then
45+ echo "Pyproject.toml found, installing dependencies with uv" && \
46+ uv sync --frozen --no-cache --link-mode=copy
47+ elif [ -f requirements.txt ]; then
48+ echo "requirements.txt found, installing dependencies with pip" && \
49+ uv venv .venv --clear && \
50+ uv pip install --python .venv/bin/python -r requirements.txt --link-mode=copy
51+ else
52+ echo "No dependency definition found" >&2
53+ exit 1
54+ fi && \
55+ cp --remove-destination "$(readlink /app{{ .Values.folder }}/.venv/bin/python)" /app{{ .Values.folder }}/.venv/bin/python 2>/dev/null || :
4656 workingDir : /app{{ .Values.folder }}
4757 volumeMounts :
4858 - name : app-mount
5565 ports :
5666 - containerPort : 8000
5767 {{- if eq .Values.stage "development" }}
58- workingDir : /app{{ .Values.folder }}
68+ {{- with .Values.containerCommands.developmentStart }}
69+ command :
70+ - /bin/sh
71+ - -c
72+ - |
73+ {{ . | nindent 14 }}
74+ {{- end }}
75+ {{- else }}
76+ {{- with .Values.containerCommands.productionStart }}
77+ command :
78+ - /bin/sh
79+ - -c
80+ - |
81+ {{ . | nindent 14 }}
82+ {{- end }}
5983 {{- end }}
6084 env :
6185 {{- range .Values.env }}
Original file line number Diff line number Diff line change @@ -16,7 +16,15 @@ ENV UV_LINK_MODE=copy
1616ENV UV_TOOL_BIN_DIR=/usr/local/bin
1717
1818COPY . /app
19- RUN uv sync --locked --no-dev
19+
20+ RUN if [ -f requirements.txt ]; then \
21+ echo "requirements.txt found, installing dependencies with uv pip" && \
22+ uv venv .venv --clear && \
23+ uv pip install -r requirements.txt; \
24+ else \
25+ echo "Using uv sync for dependency installation" && \
26+ uv sync --locked --no-dev; \
27+ fi
2028
2129# Place executables in the environment at the front of the path
2230ENV PATH="$FOLDER/.venv/bin:$PATH"
You can’t perform that action at this time.
0 commit comments