add hot reload to docker

This commit is contained in:
lauchmelder 2025-03-05 14:20:15 +01:00
parent 00a78f33b6
commit fae5f783f3
3 changed files with 30 additions and 11 deletions

View file

@ -1,8 +1,17 @@
FROM debian:bookworm-slim
FROM rust:bookworm AS builder
WORKDIR /app
VOLUME /build
WORKDIR /build
VOLUME /app
FROM builder AS dev
RUN cargo install cargo-watch
CMD [ "cargo", "watch", "-x", "run" ]
FROM builder AS build
COPY . .
RUN cargo install --path /build
FROM debian:bookworm-slim AS prod
COPY --from=build /usr/local/cargo/bin/webview /app/webview
VOLUME /fonts
CMD [ "/app/webview" ]