diff --git a/Dockerfile b/Dockerfile index 8caf1479..bce8aa0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,10 @@ COPY Cargo.toml Cargo.lock build.rs ./ COPY src src COPY static static COPY migrations migrations +# askama templates — read at *compile time* by the derive macro, so +# they must be present in the build stage even though they're embedded +# into the final binary and never read from disk at runtime. +COPY templates templates # 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