Deploy to AWS
Mantis is designed to run in your own AWS account. Terraform provisions the application infrastructure, and the deployment script builds the dashboard and gateway container.
Bootstrap Remote State
Section titled “Bootstrap Remote State”Terraform state contains sensitive values, including the ElastiCache auth token. Create the encrypted remote state bucket first:
./scripts/bootstrap_state_bucket.sh <namespace>Run the terraform init command printed by the script from the repository root.
Configure Terraform
Section titled “Configure Terraform”Generate an ElastiCache auth token:
openssl rand -hex 32Create infra/terraform.tfvars:
owner = "<your-name>"namespace = "<environment-name>"cache_auth_token = "your-generated-token"Before applying, create the gateway authentication parameters:
./scripts/setup_auth.sh <namespace> --token-id <client-name>Apply Infrastructure
Section titled “Apply Infrastructure”terraform -chdir=infra planterraform -chdir=infra applyThe initial ECS desired count defaults to 0, so infrastructure can be created before
the gateway image exists.
Deploy the Service
Section titled “Deploy the Service”./scripts/deploy.shThe deploy script builds dashboard assets, uploads them to S3, builds and pushes the gateway image to ECR, and scales the ECS service to one task.
Configure HTTPS
Section titled “Configure HTTPS”HTTPS is opt-in. Request an ACM certificate in the same AWS region as the load balancer,
complete DNS validation, then add these values to infra/terraform.tfvars:
enable_https = trueacm_certificate_arn = "arn:aws:acm:<region>:<account-id>:certificate/<certificate-id>"gateway_domain_name = "gateway.example.com"After applying, point your DNS record at the ALB DNS name from Terraform output.
Verify
Section titled “Verify”terraform -chdir=infra outputcurl -i https://<gateway-domain-name>/healthA healthy deployment returns:
{"status":"ok"}