AWS
XeroML runs on AWS via ECS (Elastic Container Service), EKS (Elastic Kubernetes Service), or a single EC2 instance with Docker Compose.
Recommended Architecture (ECS)
For production deployments, the recommended AWS architecture is:
| Component | AWS Service |
|---|---|
| Web application | ECS Fargate |
| Worker | ECS Fargate |
| PostgreSQL | Amazon RDS (PostgreSQL) |
| ClickHouse | Self-managed on EC2 or ClickHouse Cloud |
| Redis | Amazon ElastiCache (Redis) |
| Blob storage | Amazon S3 |
| Load balancer | Application Load Balancer |
| TLS | AWS Certificate Manager |
ECS Fargate Deployment
1. Set Up Database
Create an RDS PostgreSQL instance:
aws rds create-db-instance \ --db-instance-identifier xeroml-db \ --db-instance-class db.t3.medium \ --engine postgres \ --engine-version 15 \ --master-username xeroml \ --master-user-password <secure-password> \ --allocated-storage 20 \ --vpc-security-group-ids <sg-id>2. Set Up Redis
aws elasticache create-cache-cluster \ --cache-cluster-id xeroml-redis \ --cache-node-type cache.t3.micro \ --engine redis \ --num-cache-nodes 13. Create S3 Bucket
aws s3 mb s3://xeroml-data-<account-id>4. Create ECS Task Definitions
Create task definitions for the web and worker containers using the official XeroML Docker images. Set environment variables from AWS Secrets Manager or Parameter Store:
{ "family": "xeroml-web", "containerDefinitions": [{ "name": "web", "image": "ghcr.io/xeroml/xeroml:latest", "portMappings": [{"containerPort": 3000}], "secrets": [ {"name": "DATABASE_URL", "valueFrom": "arn:aws:secretsmanager:...:xeroml/DATABASE_URL"}, {"name": "NEXTAUTH_SECRET", "valueFrom": "arn:aws:secretsmanager:...:xeroml/NEXTAUTH_SECRET"} ] }]}5. Create ECS Services
aws ecs create-service \ --cluster xeroml \ --service-name xeroml-web \ --task-definition xeroml-web \ --desired-count 2 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={subnets=[subnet-xxx],securityGroups=[sg-xxx]}" \ --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:..."EKS Deployment
For EKS, use the Helm chart with AWS-specific configuration:
ingress: annotations: kubernetes.io/ingress.class: alb alb.ingress.kubernetes.io/scheme: internet-facing alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:...
serviceAccount: annotations: eks.amazonaws.com/role-arn: arn:aws:iam::...:role/xeroml-roleEC2 (Single Server)
For smaller deployments, use Docker Compose on a single EC2 instance:
# Launch an EC2 instance (t3.large recommended)# Install Docker and Docker Compose# Follow the Docker Compose guide