Skip to content

Commit e3854bb

Browse files
committed
Use uv for dev
1 parent 7c7c57a commit e3854bb

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
- containerPort: 8000
5454
{{- if eq .Values.stage "development" }}
5555
command: ["/usr/local/bin/nodemon"]
56-
args: ["--delay", "1", "--exec", "/app/{{ .Values.identifier }}/.venv/bin/python", "src/main.py"]
56+
args: ["--delay", "1", "--exec", "uv", "--isolated", "src/main.py"]
5757
workingDir: /app/{{ .Values.identifier }}
5858
{{- end }}
5959
env:

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
source .venv/bin/activate
1+
source .venv/bin/activate

Dockerfile.dev

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ WORKDIR ${FOLDER}
1010
# Enable bytecode compilation
1111
ENV UV_COMPILE_BYTECODE=1
1212

13-
# Copy from the cache instead of linking since it's a mounted volume
14-
ENV UV_LINK_MODE=copy
15-
1613
# Ensure installed tools can be executed out of the box
1714
ENV UV_TOOL_BIN_DIR=/usr/local/bin
1815

@@ -25,6 +22,9 @@ RUN apk update \
2522
&& apk add nodejs npm \
2623
&& npm install -g nodemon
2724

25+
# Allow uv to use cache
26+
RUN mkdir /.cache && chown 1000:1000 /.cache
27+
2828
USER 1000:1000
2929

3030
# Reset the entrypoint, don't invoke `uv`
@@ -34,4 +34,4 @@ EXPOSE 8000
3434
ENV PORT=8000
3535
ENV HOST="0.0.0.0"
3636

37-
CMD ["/usr/local/bin/nodemon", "--delay", "1", "--exec", ".venv/bin/python", "src/main.py"]
37+
CMD ["/usr/local/bin/nodemon", "--delay", "1", "--exec", "uv", "--isolated", "src/main.py"]

0 commit comments

Comments
 (0)