pub struct BuildConfig {
pub base_image: String,
pub runtime_image: String,
pub extra_packages: Vec<String>,
pub cargo_chef_version: String,
pub include: Option<Vec<String>>,
pub env: HashMap<String, String>,
}Expand description
Build configuration under [build].
Controls Docker image generation and runtime content.
§Bundle strategy
By default, propel deploy bundles all files in the git repository
(respecting .gitignore) into the Docker build context. This mirrors
the git clone + docker build mental model used by GitHub Actions
and similar CI/CD systems.
The bundle is created via git ls-files, so:
- Tracked and untracked (non-ignored) files are included
.gitignored files (e.g.target/) are excluded.propel-bundle/,.propel/,.git/are always excluded
§Runtime content control
The include field controls what goes into the final runtime image:
-
includeomitted (default): the entire bundle is copied into the runtime container viaCOPY . .. Zero config — migrations, templates, static assets all work automatically. -
includespecified: only the listed paths (plus the compiled binary) are copied into the runtime image. This acts as a lightweight alternative topropel ejectfor users who want smaller images.
§Escalation path
Zero config → include/env → propel eject
(all-in) (selective) (full Dockerfile control)Fields§
§base_image: StringRust builder image (default: rust:1.84-bookworm).
runtime_image: StringRuntime base image (default: gcr.io/distroless/cc-debian12).
extra_packages: Vec<String>Additional system packages to install via apt-get during build.
cargo_chef_version: StringCargo Chef version for dependency caching.
include: Option<Vec<String>>Paths to copy into the runtime image.
When None, the entire bundle is copied (COPY . .).
When Some, only these paths are copied — overriding the all-in default.
[build]
include = ["migrations/", "templates/"]env: HashMap<String, String>Static environment variables baked into the container image.
These become ENV directives in the generated Dockerfile.
For runtime-configurable values (API keys, secrets), use
Cloud Run environment variables or Secret Manager instead.
[build.env]
TEMPLATE_DIR = "/app/templates"Trait Implementations§
Source§impl Clone for BuildConfig
impl Clone for BuildConfig
Source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more