简体   繁体   English

部署Symfony2应用程序的首选方法是什么?

[英]What's the preferred way of deploying a Symfony2 application?

With symfony 1, there was a simple built in task for doing deployments via rsync. 使用symfony 1,有一个简单的内置任务,可以通过rsync进行部署。

symfony project:deploy [--go] [--rsync-dir="..."] [--rsync-options[="..."]] server

For larger, more complicated projects, I was in the habit of extending or overwriting that task with something more robust, but it was useful to have in there for a simple application. 对于更大,更复杂的项目,我习惯于使用更强大的东西来扩展或覆盖该任务,但是在那里使用简单的应用程序是有用的。

My question: Is there a standard, conventional way for deploying a Symfony2 application? 我的问题:是否有一种标准的传统方式来部署Symfony2应用程序?

There are different bundles out there that add console commands: 有不同的捆绑包可以添加控制台命令:

There is also Capifony , which is really interesting but probably way more than I need for the simple app I'm working on. 还有Capifony ,这真的很有趣,但可能比我正在使用的简单应用程序所需的更多。

Is there something else that I'm missing? 还有别的东西让我失踪吗? I guess I'm surprised there isn't a simple built in command available out of the box. 我想我很惊讶没有开箱即用的简单内置命令。

I don't believe there is a standard, conventional way to deploy Symfony 2 applications yet, esspecially as Symfony 2 is still not at a stable release. 我不相信有一种标准的,传统的方式来部署Symfony 2应用程序,特别是因为Symfony 2仍然没有稳定版本。

I highly recommened using Capifony, even for simple application deployment. 我强烈建议使用Capifony,即使是简单的应用程序部署。 It is well documented and is developed by KnpLabs so is likely to be supported long term. 它有很好的文档记录,由KnpLabs开发,因此很可能得到长期支持。

If you don't want to deal with ruby and you liked the project:deploy command from Symfony 1.4 check this bundle 如果您不想处理ruby并且您喜欢该project:deploy来自Symfony 1.4的project:deploy命令检查此捆绑包

You can easily install it using composer. 您可以使用composer轻松安装它。 Simply add "hpatoio/deploy-bundle": "~1.0" to your requirement. 只需添加"hpatoio/deploy-bundle": "~1.0"即可满足您的要求。

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

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