From f6756064220d62cc3a93349744c836dd369b9dfc Mon Sep 17 00:00:00 2001 From: Dionisio Date: Wed, 11 Feb 2026 18:12:17 +0100 Subject: [PATCH] fix(docker): restore COPY static in builder stage for include_str! login.html is embedded at compile-time via include_str! macro, so static/ must be present during cargo build. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ad847116..ba6e6583 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,10 @@ RUN apk --no-cache upgrade && \ # Copy cached dependencies (only target dir and cargo registry) COPY --from=cacher /app/target target COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/registry -# Copy only what Cargo needs to compile (static/db are runtime-only, copied in final stage) +# Copy source and static (login.html is embedded at compile-time via include_str!) COPY Cargo.toml Cargo.lock ./ COPY src src +COPY static static # Build with all optimizations (DATABASE_URL only needed at compile-time for sqlx) ARG DATABASE_URL="postgres://postgres:postgres@localhost/oxicloud" RUN DATABASE_URL="${DATABASE_URL}" cargo build --release