简体   繁体   English

Docker是在生产环境还是手动AWS设置?

[英]Docker-compose on production or manual AWS setup?

I'm a newbie with AWS. 我是AWS的新手。

Actually I work on a project and we use docker-compose in development. 实际上我从事一个项目,我们在开发中使用docker-compose。

It compose of 2 database (postgresql and redis), 3 microservices and Nginx. 它由2个数据库(PostgreSQL和Redis),3个微服务和Nginx组成。

I don't know if the best is to use docker-compose on AWS or create 2 database with RDS on AWS, 3 EC2 container and use the API gateway. 我不知道最好的方法是在AWS上使用docker-compose或在AWS上使用RDS创建2个数据库,3个EC2容器并使用API​​网关。

Thanks 谢谢

I would look into using RDS for PostgreSQL and ElastiCache for Redis. 我会考虑将RDS用于PostgreSQL,将ElastiCache用于Redis。 For your microservices I would look into using the ECS service, or possibly just Docker on EC2. 对于您的微服务,我会考虑使用ECS服务,或者可能只是使用EC2上的Docker。 You could do the same thing with Nginx, depending on what you are using that for. 您可以使用Nginx进行相同的操作,这取决于您将其用于什么用途。 You might want to look into using an Application Load Balancer instead of, or in addition to, your Nginx server. 您可能要考虑使用应用程序负载平衡器来代替Nginx服务器,或者除了Nginx服务器之外,还要使用它。

For a completely automated approach, you can use CloudFormation to build your RDS and API gateway. 对于完全自动化的方法,您可以使用CloudFormation构建您的RDS和API网关。 This same CF template can deploy your docker-compose pointing to your newly created instances. 相同的CF模板可以部署指向新创建实例的docker-compose。 This way you have a completely portable and self sufficient script. 这样,您便拥有了一个完全可移植且自给自足的脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM