propel-cli-0.3.0 is not a library.
Propel
Deploy Rust (Axum) apps to Google Cloud Run. Zero-config.
propel new my-app
cd my-app
propel deploy
What it does
- Generates an optimized multi-stage Dockerfile using Cargo Chef (4 stages: planner, cacher, builder, distroless runtime)
- Submits remote builds via Cloud Build
- Deploys to Cloud Run with Artifact Registry
- Manages secrets through Secret Manager
- Provides Supabase Auth JWT middleware for Axum (via
propel-sdk)
Install
As a library
[]
= "0.2" # core + build + cloud
= { = "0.2", = ["sdk"] } # + Supabase Auth middleware
Prerequisites
- Google Cloud SDK (
gcloudCLI) - A GCP project with billing enabled
- Required APIs: Cloud Build, Cloud Run, Secret Manager, Artifact Registry
See docs/gcp-setup.md for the full setup guide.
Commands
| Command | Description |
|---|---|
propel new <name> |
Scaffold a new project |
propel deploy |
Build and deploy to Cloud Run |
propel deploy --allow-dirty |
Deploy with uncommitted changes |
propel destroy |
Delete service, image, and local bundle |
propel doctor |
Check GCP setup and readiness |
propel secret set KEY=VALUE |
Store a secret in Secret Manager |
propel secret list |
List stored secrets |
propel status |
Show Cloud Run service status |
propel logs |
Read Cloud Run logs |
propel eject |
Export Dockerfile for manual customization |
Quick Start
1. Setup GCP
2. Verify
Propel Doctor
------------------------------
gcloud CLI OK 555.0.0
Authentication OK you@example.com
GCP Project OK your-project-id
Billing OK Enabled
Cloud Build API OK Enabled
Cloud Run API OK Enabled
Secret Manager API OK Enabled
Artifact Registry API OK Enabled
propel.toml OK Found
------------------------------
All checks passed!
3. Create and deploy
# Edit propel.toml — set gcp_project_id
4. Cleanup
Configuration
propel.toml:
[]
= "your-project-id"
= "asia-northeast1"
[]
= "rust:1.84-bookworm" # Rust build image
= "gcr.io/distroless/cc-debian12" # Minimal runtime
= [] # apt-get packages
= "0.1.68"
[]
= "512Mi"
= 1
= 0
= 10
= 80
= 8080
Bundle and runtime
By default, propel deploy bundles all files in your git repository (respecting .gitignore) and copies them into the runtime container. This means migrations/, templates/, static/, and any other committed files are available at runtime with zero configuration.
If you want a smaller runtime image, use [build.include] to select specific paths:
[]
= ["migrations/", "templates/"]
[]
= "/app/templates"
| Scenario | What to do |
|---|---|
| Migrations, templates, config files | Nothing — they're included by default |
| Optimize runtime image size | Add include = [...] to select specific paths |
| Static env vars tied to image layout | Add [build.env] entries |
| Full Dockerfile control | Run propel eject |
Dirty check
propel deploy verifies your git working tree is clean before deploying.
This prevents accidentally shipping uncommitted changes. Use --allow-dirty to override:
Crates
| Crate | crates.io | Description |
|---|---|---|
propel |
Unified facade — re-exports all sub-crates | |
propel-cli |
CLI binary (propel command) |
|
propel-core |
Configuration, project metadata, shared error types | |
propel-build |
Dockerfile generation, source bundling, eject | |
propel-cloud |
GCP operations (Cloud Build, Cloud Run, Secret Manager) | |
propel-sdk |
Axum middleware for Supabase Auth JWT |
propel (facade)
├── propel-core ← PropelConfig, ProjectMeta, Error
├── propel-build ← DockerfileGenerator, bundle, eject
├── propel-cloud ← GcloudClient, GcloudExecutor
└── propel-sdk ← PropelAuth, PropelState (feature = "sdk")
propel-cli ← CLI binary using core + build + cloud
Architecture
crates/
propel/ Unified facade crate
propel-cli/ CLI binary (clap)
propel-core/ Config loading, project metadata
propel-build/ Dockerfile generation, bundling, eject
propel-cloud/ GCP operations (Cloud Build, Cloud Run, Secret Manager)
propel-sdk/ Axum middleware (Supabase Auth JWT)
examples/
hello-axum/ Minimal example project
docs/
gcp-setup.md Full GCP setup guide
Examples
See examples/hello-axum/ for a minimal Axum project that deploys with Propel.
License
MIT OR Apache-2.0