This is not really a Laravel problem/question, you have to ask on a dev-ops forum what they would do to deploy a PHP application like yours.
Your Laravel application is basically PHP application, some packages are provided by Composer, so it's more a Composer application than a Laravel one, but you might have some Laravel needs, like executing php artisan migrate
, or any other artisan command to post-deploy your application, or not, so, it's more a requirement of your application than Laravel, right?
我开发了一个用于部署的包,Deeployer.这个包的目的是,每当我将应用程序推送到生产(或登台)分支时,Github都会启动一个钩子,告诉我的服务器执行任何需要的操作,将我的应用程序部署到我自己的VPS.在基本部署中,它将:
1) git pull
the repository
2) 执行composer update
以更新我的供应商文件夹
3) 执行bower update
下载我安装的任何js或css
4) 执行php artisan migrate
以升级我的数据库架构
5) Execute chmod
and chown
to fix whatever permission mess those commands might have made to my directories while downloading files
看见这些都是我的部署 struct 非常特殊的事情,这就是为什么我真的不认为你会对部署应用程序达成共识.当阿纳凯森第一次制造火箭时,有人喊道:"如果我们已经有了卡皮斯特拉诺,你为什么要这么做?".
Yesterday I bumped into this one: http://www.deployhq.com/packages, used by Ben Corlet from Cartalyst and other nice guys.
There's also Rocketeer: http://rocketeer.autopergamene.eu/.
不要忘记,Laravel本身有自己的SSH远程组件(我在Deeployer上使用过它,Rocketeer也在使用它),这可能会帮助您完成部署应用程序所需的任何操作.
所以,你最好想一想你的部署需求是什么,然后找到你的方法,使用一个软件包、应用程序或者仅仅是Laravel.