Skip to content
Clone

fix(docker): drop stale web/admin build output before compiling

The cargo cache mount survives across builds, so the web and admin crates
kept the previously embedded frontend assets and the image shipped stale
dist_embed output after a frontend change. Remove those build and dep
artifacts before cargo build so the embedded web and admin bundles are
always regenerated from the current sources.
ZhenYi committed
parent 3b76bf0 commit a79b908 Browse files

1 file changed

+2 −0

Modified Dockerfile View Dockerfile
@@ -27,6 +27,8 @@
2727RUN --mount=type=cache,target=/usr/local/cargo/registry \
2828 --mount=type=cache,target=/usr/local/cargo/git \
2929 --mount=type=cache,target=/build/target \
30 rm -rf /build/target/release/build/web-* /build/target/release/build/admin-web-* \
31 /build/target/release/deps/web-* /build/target/release/deps/admin_web-* 2>/dev/null; \
3032 cargo build --release --workspace --bins && \
3133 mkdir -p /out && \
3234 for b in apihost githost synchost mails migrate openapi im adminhost webhook runner aihost; do \