首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Codeigniter部署流程

Codeigniter部署流程
EN

Stack Overflow用户
提问于 2011-09-04 00:09:53
回答 3查看 512关注 0票数 1

我在VCS下有一个CI 2.0项目,其中的repo托管在我的服务器上。目前,我已经在下面发布了一个bash脚本。它签出源代码,移动一些文件,并重新启动服务器以反映更新后的网站。

我当前的方法有什么问题吗?其他人对我可以使用的其他工具或做得更好的方法有什么其他的建议吗?谢谢!

代码语言:javascript
复制
# Stop apache while we update the server, and export our svn repo to a tmp dir
sudo /etc/init.d/apache2 stop
svn export file:///home/steve/repository/example/trunk /home/steve/example_dev/

# Prepare the public_html folder for the update, and remove the tmp directory
rm -rf /home/steve/public_html/example.com/public/
mv /home/steve/example_dev/ /home/steve/public_html/example.com/public/
rm -rf /home/steve/public_html/example.com/public/license.txt
rm -rf /home/steve/public_html/example.com/public/user_guide
rm -rf /home/steve/example_dev

# Restart apache
sudo /etc/init.d/apache2 start
EN

回答 3

Stack Overflow用户

发布于 2011-09-06 02:40:28

我使用的是本地的WAMP目录,其中存储了我的项目的目录( DreamWeaver会自动执行此操作)。然后,我使用DreamWeaver直接与实时服务器一起工作。所以每次我编辑一个文件时,它都会覆盖我的本地目录。在活动服务器上立即进行更改,然后当我准备提交到我的SVN主干时,我只需运行SmartSVN (或您使用的任何东西),然后将我的本地WAMP目录提交到SVN。

我不知道这是否真的是最好的选择,但它很可能比重启for服务器进行更改要好得多。

票数 0
EN

Stack Overflow用户

发布于 2011-09-07 02:14:15

现在,我找到了一种更简单的方法来更新我的网站。我也不再重新启动Apache :)查看下面的脚本。

代码语言:javascript
复制
svn export --force file:///home/steve/repo/example/trunk \
 /home/steve/public_html/example.com/public/
票数 0
EN

Stack Overflow用户

发布于 2012-05-05 02:24:00

我们使用Capistrano进行CI和其他PHP部署。它工作得很好。https://github.com/namics/capistrano-php

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7294235

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档