diff --git a/packages/noco-docs/content/en/getting-started/installation.md b/packages/noco-docs/content/en/getting-started/installation.md index e1a0c24b9b..83de4b5e5d 100644 --- a/packages/noco-docs/content/en/getting-started/installation.md +++ b/packages/noco-docs/content/en/getting-started/installation.md @@ -171,11 +171,103 @@ And connection params for this database can be specified in `NC_DB` environment -### Sample app - +### AWS ECS (Fargate) + +#### Create ECS Cluster + +``` +aws ecs create-cluster \ +--cluster-name +``` + +#### Create Log group + +``` +aws logs create-log-group \ +--log-group-name /ecs// +``` + +#### Create ECS Task Definiton + +Every time you create it, it will add a new version. If it is not existing, the version will be 1. + +```bash +aws ecs register-task-definition \ +--cli-input-json "file://./.json" +``` + + +This json file defines the container specification. You can define secrets such as NC_DB and environment variables here. + + +Here's the sample Task Definition + +```json +{ + "family": "nocodb-sample-task-def", + "networkMode": "awsvpc", + "containerDefinitions": [{ + "name": "", + "image": "nocodb/nocodb:latest", + "essential": true, + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs//", + "awslogs-region": "", + "awslogs-stream-prefix": "ecs" + } + }, + "secrets": [{ + "name": "", + "valueFrom": "" + }], + "environment": [{ + "name": "", + "value": "" + }], + "portMappings": [{ + "containerPort": 8080, + "hostPort": 8080, + "protocol": "tcp" + }] + }], + "requiresCompatibilities": [ + "FARGATE" + ], + "cpu": "256", + "memory": "512", + "executionRoleArn": "", + "taskRoleArn": "" +} +``` + +#### Create ECS Service + +```bash +aws ecs create-service \ +--cluster \ +--service-name \ +--task-definition : \ +--desired-count \ +--launch-type "FARGATE" \ +--platform-version \ +--health-check-grace-period-seconds \ +--network-configuration "awsvpcConfiguration={subnets=[""], securityGroups=[""]" \ +--load-balancer targetGroupArn=,containerName=,containerPort= +``` + + + If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules. + + ## Sample Demos +### Code Sandbox + + + ### Docker deploying with one command