Convox Deployment
Rack Gateway deploys as a single Convox service that serves the API and the web UI.
An optional admin service is included in convox.yml for running migrations or admin tasks.
Prerequisites
Section titled “Prerequisites”- Convox CLI authenticated against your rack
- Google OAuth client configured (see OAuth Setup)
- PostgreSQL database (Convox resource or external)
Deployment Steps
Section titled “Deployment Steps”-
Set required environment variables
Terminal window convox env set \DOMAIN=gateway.example.com \APP_SECRET_KEY=$(openssl rand -base64 32) \GOOGLE_CLIENT_ID=your-client-id \GOOGLE_CLIENT_SECRET=your-client-secret \GOOGLE_ALLOWED_DOMAIN=example.com \ADMIN_USERS=admin@example.com \RACK_TOKEN=your-convox-rack-token -
(Optional) Configure audit anchors
Terminal window convox env set \AUDIT_HMAC_SECRET=your-hmac-secret \AUDIT_ANCHOR_BUCKET=your-worm-bucket \AUDIT_ANCHOR_CHAIN_ID=production \AUDIT_ANCHOR_RETENTION_DAYS=400 -
Deploy
Terminal window convox deploy -a rack-gateway -
Verify
Terminal window curl -s https://gateway.example.com/api/v1/health
Environment Variables
Section titled “Environment Variables”Required
Section titled “Required”| Variable | Description |
|---|---|
DOMAIN | Gateway domain (used for OAuth redirects) |
APP_SECRET_KEY | Session/CSRF secret |
GOOGLE_CLIENT_ID | OAuth client ID |
GOOGLE_CLIENT_SECRET | OAuth client secret |
GOOGLE_ALLOWED_DOMAIN | Allowed email domain |
ADMIN_USERS | Comma-separated bootstrap admin emails |
RACK_TOKEN | Convox rack API token |
Recommended
Section titled “Recommended”| Variable | Description |
|---|---|
AUDIT_HMAC_SECRET | HMAC chain secret (required in production) |
RACK_ALIAS | Short rack identifier |
RACK_DISPLAY_NAME | Human-readable rack name |
Optional
Section titled “Optional”| Variable | Description |
|---|---|
RACK_HOST | Convox rack API URL (override) |
POSTMARK_API_TOKEN | Email notifications |
SLACK_CLIENT_ID | Slack integration |
SLACK_CLIENT_SECRET | Slack integration |
Database Configuration
Section titled “Database Configuration”Using Convox PostgreSQL Resource
Section titled “Using Convox PostgreSQL Resource”convox resources create postgres --name gateway-dbconvox resources link gateway-db -a rack-gatewayConvox automatically sets DATABASE_URL for linked apps.
Using External PostgreSQL
Section titled “Using External PostgreSQL”convox env set DATABASE_URL=postgres://user:pass@host:5432/rack_gatewayRunning Migrations
Section titled “Running Migrations”Use the admin service in convox.yml for database tasks:
convox run admin -- ./rack-gateway-api migrate -a rack-gatewayConvox Manifest
Section titled “Convox Manifest”The repository ships a production-ready convox.yml that defines:
gatewayservice (API + web UI)adminservice (on-demand maintenance)- CloudWatch retention via
LOG_RETENTION_DAYSinappSettings
Keep the manifest in sync with your deployment.