Deploy Docker applications, manage immutable revisions, promote changes between environments, perform zero-downtime Blue/Green releases, and roll back failed deployments without requiring Kubernetes.
Immutable Revisions (Zero-Git or GitOps)
Every create, edit, delete, promotion, or CI sync writes an immutable revision (rev-1, rev-2, …) to D1 (fleet_revisions) and archives a SHA-256 verified full-fleet snapshot in R2 (state/revisions/rev-N.json).
- Dashboard-First (Zero-Git): Define, clone, edit, and deploy services directly from the FlareLens UI using structured forms or the built-in JSON manifest editor.
- Pre-Staged Services (
enabled: false): Commit production manifests in aSuspendedstate so operators can audit ports, domains, secrets, and cgroup budgets before cutover day—tagged CI releases update the recorded image without starting containers prematurely. - Optional Keyless GitOps: Synchronize repository manifests from GitHub Actions using short-lived OIDC tokens (
id-token: write).
7-Step Zero-Downtime Blue/Green Pipeline
When rolling out a blue_green service, flarelensd runs a deterministic 7-step state machine on each assigned host:
Pre-Deploy Database Guardrail
When
pre_deploy_snapshot: trueorrun_migrations: trueis configured, streams a compressedpg_dumparchive directly to Cloudflare R2 before touching database schemas.Authenticated OCI Image Pull
Pulls the target image tag or
@sha256digest using ephemeral registry credentials kept strictly in memory.Ephemeral Schema Migration Container
Executes
migration_commandinside a one-shot container attached to the internal network; aborts cutover and triggers snapshot recovery on non-zero exit.Candidate Slot Boot
Starts the inactive slot (
-greenwhile-blueserves live traffic) with decrypted Vault env vars,/dev/shmsecret files, and kernel cgroup caps.HTTP Readiness Verification
Probes
health_pathoninternal_portuntil consecutive200 OKresponses confirm application health.Atomic <1ms Traefik Swap
Atomically updates the dynamic Traefik upstream route (including multi-domain
Host(...)rules and cross-noderemote_upstreams) so new traffic shifts in under a millisecond.Graceful Connection Drain & Cleanup
Allows in-flight requests on the retiring slot to complete cleanly before stopping the old container and scheduling debounced image pruning.
Environment Promotion & 1-Click Rollback
Promote verified UAT container digests and runtime settings to prod in one click while preserving production domains, replica counts, volumes, and environment-scoped Vault secrets:
curl -X POST https://ops.example.com/api/v1/control/fleet/promote \
-H "Authorization: Bearer $FLARELENS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"source_env":"uat","target_env":"prod","services":["checkout-api"]}'If error rates climb after a release, selecting Rollback on any historical rev-N snapshot restores exact image digests, environment variables, and even deleted service definitions in a single atomic revision.
Scheduled CronJobs & One-Off Container Jobs
Declare recurring CronJob schedules or on-demand maintenance commands directly inside a service manifest under jobs:. The Cloudflare Control Plane evaluates 5-field UTC cron expressions every minute (enforcing single-execution slot keys and concurrency_policy: forbid) while flarelensd executes the job inside an isolated ephemeral container (--rm semantics) on your host node with hard cgroup caps, decrypted Vault secrets, and private *.mesh DNS:
service: checkout-api
env: prod
image: ghcr.io/example/checkout-api:1.4.2
jobs:
- name: nightly-reconcile
schedule: "0 2 * * *"
command: ["/app/checkout", "jobs", "reconcile"]
concurrency_policy: forbid
timeout_seconds: 900
memory_mb: 512
cpu_cores: 0.5
- name: backfill-invoices
command: ["/app/checkout", "jobs", "backfill"]
timeout_seconds: 1800Trigger any declared job—or an ad-hoc one-off command—from the Fleet GitOps dashboard or over HTTP:
curl -X POST https://ops.example.com/api/v1/control/jobs/run \
-H "Authorization: Bearer $FLARELENS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"env":"prod","service":"checkout-api","job_name":"backfill-invoices"}'