简体   繁体   English

如何将ember-cli app部署到S3

[英]How to deploy ember-cli app to S3

I have an ember-cli app that is deployed in S3. 我有一个在S3中部署的ember-cli应用程序。 It works well, and I have Travis set up to deploy changes when there is a merge into the master branch in GitHub. 它运行良好,当在GitHub中的master分支中有合并时,我就设置了Travis来部署更改。

But sometimes I want to test a change in the deployment environment without a commit -- perhaps because it can only be tested in that environment, like a fix to a mobile-only defect. 但是有时我想在没有提交的情况下测试部署环境中的更改-也许是因为只能在该环境中进行测试,例如对仅移动设备缺陷的修复。

So I tried: 所以我尝试了:

ember build --environment=production

followed by: 其次是:

aws s3 cp dist/ s3://my_bucket/ --recursive

which uploaded things to my bucket. 将东西上传到我的存储桶中。 But the page didn't work, my browser told me there was a redirect loop. 但是页面不起作用,我的浏览器告诉我存在重定向循环。 It wasn't a code issue, because when I pushed the changes to master, Travis successfully deployed them to S3. 这不是代码问题,因为当我将更改推送到master时,Travis成功地将它们部署到了S3。

Is there something clearly wrong with what I did, copying the dist folder to my bucket? 我将dist文件夹复制到我的存储桶中的操作明显有问题吗?

I'm using Ember-cli 1.3.1, if that matters. 如果有的话,我正在使用Ember-cli 1.3.1。

I suggest you use ember-cli-deploy works pretty and support several plugin in order deliver your code much more easier. 我建议您使用ember-cli-deploy效果不错,并支持多个插件,以便更轻松地交付代码。

I haven been using it for a while a work pretty well. 我已经使用了一段时间了,效果还不错。

http://ember-cli.github.io/ember-cli-deploy/plugins/ http://ember-cli.github.io/ember-cli-deploy/plugins/

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

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