From 6f5c99cc722937423c73c8fb3873051681fa18c4 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Thu, 4 Jun 2026 11:04:01 +0200 Subject: [PATCH] fix(dev): mount build.rs + Cargo.{toml,lock} into cryptify-fileshare cryptify/build.rs reads Cargo.lock to extract the pg-core version and sets PG_CORE_VERSION, which src/email.rs consumes via env!() to stamp the X-PostGuard mail header. The dev container only mounted src/ and templates/, so cargo-watch saw a package with no build script and compilation failed with "environment variable PG_CORE_VERSION not defined at compile time". Mount build.rs, Cargo.toml, and Cargo.lock read-only so the build script runs and a future pg-core bump in Cargo.lock retriggers the rebuild via cargo:rerun-if-changed=Cargo.lock. --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4f72948..6801caa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,9 @@ services: - ./cryptify/conf/config.dev.toml:/app/config.toml:ro - ./cryptify/src:/app/src - ./cryptify/templates:/app/templates + - ./cryptify/build.rs:/app/build.rs:ro + - ./cryptify/Cargo.toml:/app/Cargo.toml:ro + - ./cryptify/Cargo.lock:/app/Cargo.lock:ro - cryptify-target:/app/target environment: - RUST_LOG=info