在Fargate上使用LoadBalancer和Route53的AWS ECS Node.js网站

该项目展示了如何使用AWS CDK在Fargate上通过ECS运行一个安全的Node.js Web应用程序。cdk.json文件指定了CDK Toolkit执行应用程序的方式。设置域名和Route53的HTTPS证书,创建ECS注册表、集群、任务和服务,使用Docker构建和推送镜像,并测试应用程序。还包括CI整合以及可选的多账户AWS设置(开发、测试、生产)和其他注意事项(安全性、WAF、CloudFront)。

cd simple

docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .

docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

docker image ls

docker run -d -p 3000:3000 测试应用程序
zip
aws-ecs-simplewebsite-main.zip 预估大小:14个文件
folder
aws-ecs-simplewebsite-main 文件夹
folder
bin 文件夹
file
aws-ecs-simplewebsite.ts 1KB
file
package.json 837B
folder
test 文件夹
file
aws-ecs-simplewebsite.test.ts 590B
folder
simple 文件夹
file
package.json 366B
file
Dockerfile 258B
file
package-lock.json 37KB
file
jest.config.js 130B
file
package-lock.json 663KB
file
.npmignore 65B
file
tsconfig.json 598B
file
cdk.json 520B
file
.gitignore 117B
folder
lib 文件夹
file
webapp-stack.ts 2KB
file
README.md 1KB
zip 文件大小:173.07KB