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
Modified Dockerfile Dockerfile +2 −0 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 \