Symfony2 Capistrano deploying to CDN

给你一囗甜甜゛ 提交于 2020-01-04 05:53:18

问题


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


回答1:


Only static assets needs to be served by your CDN.

See also: automatic push to CDN deployment strategy



来源:https://stackoverflow.com/questions/15943276/symfony2-capistrano-deploying-to-cdn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!