Cloud Deployment
ZinTrust is designed to run on multiple cloud targets, from serverless request runtimes such as Cloudflare Workers and AWS Lambda to traditional VPS and container deployments.
Terminology
In this guide:
- Cloudflare Worker means the Cloudflare serverless request runtime deployed with Wrangler.
- AWS Lambda means the AWS serverless request runtime.
- Serverless runtime is the broader category that includes both of the above.
- ZinTrust worker does not mean a Cloudflare Worker or Lambda function. It means a background job worker from the ZinTrust workers system.
Automated Workflows
The easiest way to set up cloud deployment is using the ZinTrust CLI (installed via @zintrust/core) to generate GitHub Actions workflows.
# Generate a workflow for AWS Lambda
zin add workflow --platform lambda
# Generate a workflow for Cloudflare Workers
zin add workflow --platform cloudflare
# Generate workflows for all supported platforms
zin add workflow --platform allThis will create a .github/workflows/deploy-cloud.yml file tailored to your chosen platform.
Cloudflare Workers
ZinTrust can be deployed to the Cloudflare Worker runtime using the wrangler CLI.
npm run deployBy default, this deploy targets the production Wrangler environment. To deploy to a different environment:
WRANGLER_ENV=development npm run deployEnsure you have configured your wrangler.toml with the necessary KV namespaces for secrets management.
AWS Lambda
Deploy ZinTrust as a serverless request handler on AWS Lambda using the LambdaAdapter.
import { LambdaAdapter } from '@zintrust/core';
import { app } from './app';
export const handler = LambdaAdapter.create(app);Vercel / Netlify
For frontend-heavy applications or documentation sites, ZinTrust integrates perfectly with Vercel and Netlify.
DigitalOcean / Linode / AWS EC2
For traditional VPS deployments, follow the standard Deployment Guide using PM2 and Nginx.
Secrets Management
ZinTrust's SecretsManager provides a unified interface for retrieving secrets from various cloud providers:
- Cloudflare KV
- AWS Secrets Manager
- Environment Variables (Fallback)