Production Deployment

Run Compozy against a hardened Temporal cluster with production guardrails and operational best practices.

Deployment Checklist

  • Managed Temporal

    Use Temporal Cloud or a self-managed Temporal cluster with multi-node frontend, history, matching, and worker services. Verify TLS and authentication.

  • Durable Datastores

    Provision managed PostgreSQL for Compozy metadata and Redis for caching, rate limiting, and configuration layers.

  • Secrets & Config

    Load secrets from your platform (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault) and mount compozy.yaml with read-only permissions.

  • Observability

    Enable structured logging, metrics export, and distributed tracing in both Compozy and Temporal. Ensure alerts cover queue backlogs and workflow failures.

Database Selection

Production database configuration
database:
  driver: postgres
  conn_string: postgres://compozy:${DB_PASSWORD}@postgres.prod.internal:5432/compozy?sslmode=verify-full

knowledge:
  vector_dbs:
    - id: main
      provider: pgvector
      dimension: 1536
  • Enable the pgvector extension to keep embeddings in the same PostgreSQL cluster.
  • Grant least-privilege credentials: schema migrations need CREATE, runtime requires CRUD permissions.
  • Capture automated backups (RDS snapshots, PITR) before major releases.

For staging environments that mimic production, follow the same PostgreSQL configuration and capacity planning guidance. See the Database Overview for the full decision matrix.

Configure remote mode explicitly in your project configuration. Compozy will refuse to start if temporal.mode is missing in production builds.

compozy.yaml
server:
  environment: production

temporal:
  mode: remote
  host_port: temporal.my-company.internal:7233
  namespace: compozy-prod
  task_queue: compozy-tasks

runtime:
  environment: production
Start with hardened settings
COMPOZY_CONFIG_FILE=./compozy.yaml \
  compozy start \
    --format json \
    --temporal-mode=remote \
    --temporal-host=temporal.my-company.internal:7233

Best Practices

ConcernGuidance
High availabilityDeploy Temporal with at least 3 history and 2 frontend instances. Use load balancers with health checks on port 7233.
SecurityEnable mTLS between Compozy and Temporal. Lock down the Temporal Web UI to trusted networks only.
NamespacesUse dedicated namespaces per environment (dev, staging, prod) to isolate retention policies and rate limits.
Task queuesPartition workloads using multiple task queues when different latency or concurrency guarantees are required.
Disaster recoveryConfigure Temporal replication or backups. Test failover playbooks quarterly.

Choosing a Mode

CriterionChoose DistributedChoose Standalone
Durability / HAYesNo
Team size & shared envTeam / sharedSolo dev / CI
Operational complexityHigherLower

Refer to Mode Configuration for inheritance and overrides.

Migration Tips

  • Plan a low-traffic maintenance window.
  • Update temporal.mode to remote in configuration management.
  • Point workers to the production Temporal cluster.
  • Restart Compozy servers to pick up the new configuration.
  • Monitor workflow metrics and queues closely for the first 30 minutes.

See Also