【问题标题】:Deploying separate front end web app and RESTful API on Elastic Beanstalk?在 Elastic Beanstalk 上部署单独的前端 Web 应用程序和 RESTful API?
【发布时间】:2017-05-25 20:50:19
【问题描述】:

我的问题与:https://forums.aws.amazon.com/thread.jspa?threadID=140592 完全相同,没有答案。

当人们使用 Elastic Beanstalk 在 Apache 中运行单独的前端应用程序和在 Tomcat 中运行 RESTful API 时,通常如何部署。

前端和后端的 Elastic Beanstalk 分开?

或者有没有办法将两者部署在同一个 Elastic Beanstalk 中?

【问题讨论】:

  • 前端应用程序是静态的(HTML、CSS 等)还是动态的(php、Java、nodejs 等)?
  • @DaveMaple FrontEnd 是静态的(HTML、CSS、JS),它向后端发送 HTTP 请求以获取 JSON 格式的数据。
  • @AnmolGuptafor the front-end as you said that is only static files,您只需将其部署到S3存储桶和CDN以在全球范围内提供文件,它就可以工作。这里有几个相关链接medium.com/wolox-driving-innovation/…stackoverflow.com/questions/28063945/…

标签: amazon-web-services amazon-elastic-beanstalk


【解决方案1】:

根据您的用例,我建议您使用 S3 托管您的静态文件,您的 API 在 Elastic Beanstalk 上,并使用 Cloudfront 在它们之间路由请求。

类似用例:https://www.codeengine.com/articles/process-form-aws-api-gateway-lambda/

【讨论】:

  • 谢谢!调查一下。
猜你喜欢
  • 2014-01-06
  • 2021-04-28
  • 2016-11-20
  • 2018-09-13
  • 2017-08-01
  • 2012-09-24
  • 1970-01-01
  • 2012-07-04
  • 2017-01-18
相关资源
最近更新 更多