简体   繁体   English

如何部署CodeIgniter / Laravel应用程序

[英]How to Deploy CodeIgniter/Laravel Apps

I need to know which are my options when deploying codeigniter/laravel apps. 在部署codeigniter / laravel应用程序时,我需要知道哪些是我的选择。

I develop locally all the time at my home and when i go to work i need some quick way to push all the changes to the server. 我一直在家里开发本地,当我去上班时,我需要一些快速的方法将所有更改推送到服务器。

Application code needs to be updated, database schemas need to be migrated, and application servers must be restarted. 需要更新应用程序代码,需要迁移数据库模式,并且必须重新启动应用程序服务器。

I do all of this manually wasting a lot of time and i need some automated way kinda like capistrano in Rails environment. 我手动浪费了大量的时间,我需要一些自动化的方式,比如在Rails环境中的capistrano。

What are my options here ?? 我有什么选择?

Update: I got my own server machine, and everything needs to work on an intranet environment without internet connection. 更新:我有自己的服务器机器,一切都需要在没有互联网连接的内部网环境中工作。

I've used the following: 我用过以下内容:

  1. Salt - http://www.saltstack.org/ 盐 - http://www.saltstack.org/

    Worked well, a bit fiddly to setup. 工作得很好,设置有点繁琐。 Super fast deployment. 超快速部署。 Lots of control. 很多控制。 Less learning overhead that Puppet & Chef, has some level of native MySQL tools. Puppet&Chef的学习开销较少,具有一定程度的原生MySQL工具。

  2. GitHub GitHub上

    Requires a internet connection to/from your machine - one where, at some level, the end point as write permissions to interactive scripts.... Works, but makes me nervous. 需要与您的机器之间的互联网连接 - 在某种程度上,终端作为交互式脚本的写入权限....工作,但让我感到紧张。 Pulls are better than pushes, and it's better than most other solutions. 拉动比推动更好,并且它比大多数其他解决方案更好。

  3. Custom shell scripting 自定义shell脚本

    Yeah - this is the most common, just tar up the entire CI dir once it's been validated on staging and push out using Salt... 是的 - 这是最常见的,只要在整个CI目录上进行验证,一旦它在升级验证并使用Salt推出......

  4. Scalextreme Scalextreme

    We've been looking at this for a few months - the interface is from the 1990's, but it's got really nice functionality, including system-independent script library that you can target at any machine. 我们已经看了几个月了 - 接口是从1990年开始的,但它有非常好的功能,包括你可以在任何机器上定位的独立于系统的脚本库。

  5. Turnkey Linux 交钥匙Linux

    The hammer - this will migrate an entire system image from a desktop to EC2 is something like 5 minutes. 锤子 - 这将整个系统映像从桌面迁移到EC2就像是5分钟。 Works great and you can also move stuff between VM systems. 效果很好,你也可以在VM系统之间移动东西。 In the end, I think that updating AMI's on EC2 is so easy that this might be one of the answers... 最后,我认为在EC2上更新AMI很容易,这可能是答案之一......

Nothing has truly been satisfactory and DB schema changes are a huge pain. 没有什么是真正令人满意的,DB模式的改变是一个巨大的痛苦。 So much so that for client configs, we're moving from MySQL to Cassandra, which is basically schemaless. 因此,对于客户端配置,我们正在从MySQL迁移到Cassandra,这基本上是无模式的。 CI installer is interesting, but I'm not sure how it handles updates. CI安装程序很有趣,但我不确定它如何处理更新。

I recently came across this CodeIgniter Installer on GitHub. 我最近在GitHub上遇到了这个CodeIgniter安装程序 I've played around with it a few times and it works like a charm for me. 我已经玩了好几次,它对我来说就像一个魅力。

It's as simple as putting it in your root directory (alongside your system folder), generating a MySQL dump, and editing a few files. 它就像将它放在根目录(与系统文件夹一起),生成MySQL转储和编辑几个文件一样简单。 Full instructions are here 完整的说明在这里

I hope it works for you as well as it did for me. 我希望它对你有用,对我也有用。

I found this Laravel Installer on Github which might be useful. 我在Github上找到了这个Laravel Installer ,它可能很有用。 (First I came across this question after searching for Laravel installer in Google, then searched Github for Laravel Installer) (首先我在Google中搜索Laravel安装程序后遇到了这个问题,然后在Github上搜索了Laravel Installer)

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

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