Skip to content

Commit f675606

Browse files
author
Dionisio
committed
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.
1 parent 95e2f9a commit f675606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ RUN apk --no-cache upgrade && \
1717
# Copy cached dependencies (only target dir and cargo registry)
1818
COPY --from=cacher /app/target target
1919
COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/registry
20-
# Copy only what Cargo needs to compile (static/db are runtime-only, copied in final stage)
20+
# Copy source and static (login.html is embedded at compile-time via include_str!)
2121
COPY Cargo.toml Cargo.lock ./
2222
COPY src src
23+
COPY static static
2324
# Build with all optimizations (DATABASE_URL only needed at compile-time for sqlx)
2425
ARG DATABASE_URL="postgres://postgres:postgres@localhost/oxicloud"
2526
RUN DATABASE_URL="${DATABASE_URL}" cargo build --release

0 commit comments

Comments
 (0)