Rails / Capistrano工具将静态资产部署到Rackspace云文件或Amazon Cloud Front? [英] Rails/Capistrano tool to deploy static assets to Rackspace Cloud Files or Amazon Cloud Front?

查看:366
本文介绍了Rails / Capistrano工具将静态资产部署到Rackspace云文件或Amazon Cloud Front?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道一个工具会自动将Rails应用程序静态资源部署到Rackspace Cloud Files或Amazon Cloud Front?

Is anyone aware of a tool that will automatically deploy a Rails app static assets to Rackspace Cloud Files or Amazon Cloud Front?

在我的完美世界中,capistrano会自动上传在javascripts,样式表和图像中的所有内容然后覆盖默认的image_tag和script_tags路由到相应的CDN路径。

In my perfect world capistrano would automatically upload everything in javascripts, stylesheets, and images then override the default image_tag and script_tags to route to the appropriate CDN path.

如果部署任务创建了一个新容器每个部署如cap创建一个新的发布目录,或者应该使用相同的容器,并保留一个缓存文件与所有部署的资产的哈希值,并且只部署新的资产以利用长CDN TTL。

It would be great if the deploy task created a new container with each deploy like cap creates a new release directory, or maybe it should use the same containers and keep a cached file with the hashes of all the deployed assets and only deploy new assets to take advantage of long CDN TTLs.

推荐答案

我不知道任何东西,但是你可能在没有太多工作的情况下用脚本来做这件事。

I'm not aware of anything, but you could probably script something to do this without too much work.

Fog gem提供了一个不可知的API,用于将文件推送到Amazon S3和Rackspace Cloud文件等。

The Fog gem provides an agnostic API for pushing files to Amazon S3 and Rackspace Cloud files, among others.

这篇关于Rails / Capistrano工具将静态资产部署到Rackspace云文件或Amazon Cloud Front?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆