Symfony2 Capistrano部署到CDN [英] Symfony2 Capistrano deploying to CDN
问题描述
框架:
模板:
引擎:['twig']
assets_base_urls:
http:[http://static.example.com]
但是,当使用capistrano进行部署时,我需要将整个应用程序部署到CDN以及将托管网站的服务器,或者只能部署资产,即图像,js文件等到CDN和动态文件到服务器/ s?
谢谢
只有静态资产需要由您的CDN提供。
另请参见:
自动推送到CDN部署策略
I've got a Symfony2 application which I am deploying to development, staging and production servers using Capistrano. However, I'm looking to also setup a CDN to serve static content such as images, css, js files etc. The URL for the CDN for example is static.example.com. I've read that I simply need to add the following to my config_prod.yml file:
framework:
templating:
engines: ['twig']
assets_base_urls:
http: [http://static.example.com]
However, when deploying using capistrano would I need to deploy the whole application to the CDN as well as the server that will host the website or can I deploy only the assets i.e images, js files etc to the CDN and the dynamic files to the server/s?
Thanks
Only static assets needs to be served by your CDN.
See also: automatic push to CDN deployment strategy
这篇关于Symfony2 Capistrano部署到CDN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!