Skip to content
TrustMeshVyantraa

Operate

Deployment guide

Docker, Terraform for AWS, and what is not yet provisioned.

Containers

api/Dockerfile builds the FastAPI service (runs migrations, then uvicorn on port 8810, with a /v1/health check). web/Dockerfile builds a standalone Next.js server on port 8800 with TRUSTMESH_API_ORIGIN pointing to the API. docker-compose.yml runs PostgreSQL, OPA, the API and the web app together.

bash
docker compose up --build

AWS (Terraform)

infra/terraform defines a VPC, an RDS PostgreSQL instance (encrypted with a KMS key), Secrets Manager secrets, ECR repositories, an ECS Fargate cluster with API and web services behind an Application Load Balancer, CloudWatch log groups and least-privilege task roles.

Not provisioned: nothing in this repository has been applied to an AWS account. Running Terraform requires your AWS credentials, a domain and an ACM certificate. Review costs before applying.

Production checklist

  • ENVIRONMENT=production, COOKIE_SECURE=true, a strong SECRET_PEPPER from Secrets Manager.
  • Run migrations with the owner role; run the app with the non-owner role (APP_DB_ROLE).
  • Put the API and web behind TLS; set CORS_ORIGINS and PUBLIC_BASE_URL.
  • Replace local accounts with an identity provider before onboarding customers (Cognito planned).
  • Configure email delivery for password resets and invitations (currently written to logs).