什么是最好的 Drupal 部署策略? [英] What's best Drupal deployment strategy?

查看:20
本文介绍了什么是最好的 Drupal 部署策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 MacBook 上的 XAMPP 上开展我的第一个 Drupal 项目.这是一个原型,从我的客户那里得到了积极的反馈.

I am working on my first Drupal project on XAMPP in my MacBook. It's a prototype and receives positive feedback from my client.

两周后我将在 Linux VPS 上部署该项目.有没有比从头开始在服务器上重新做所有事情"更好的方法?

I am going to deploy the project on a Linux VPS two weeks later. Is there a better way than 're-do'ing everything on the server from scratch?

  • 安装 Drupal
  • 下载模块(CCK、视图、日期、日历)
  • 创建内容
  • ...

谢谢

推荐答案

一些提示:

  • 对文件使用源代码管理,而不是 FTP/等.你使用什么并不重要;我们倾向于为每个客户建立一个 Unfuddle.com subversion 帐户,以便他们也有一个地方来记录错误,但关键的第一步是将站点的完整源代码树纳入版本控制.当在测试服务器或临时服务器上进行更改时,您会查看它们是否有效,您提交,然后在实时服务器上进行更新.回滚和部署变得更加简单.对于多个 webhead 的集群,您可以重复该过程,或从单个规范"服务器进行 rsync.

  • Use source control, NOT FTP/etc., for the files. It doesn't matter what you use; we tend to spin up an Unfuddle.com subversion account for each client so they have a place to log bugs as well, but the critical first step is getting the full source tree of your site into version control. When changes are made on the testing server or staging server, you see if they work, you commit, then you update on the live server. Rollbacks and deployment gets a lot, lot simpler. For clusters of multiple webheads you can repeat the process, or rsync from a single 'canonical' server.

如果你使用 SVN,那么你也可以使用 Drupal 和其他模块/主题的 CVS checkouts,并且 SVN/CVS 元数据将能够愉快地并存.

If you use SVN, though, you can also use CVS checkouts of Drupal and other modules/themes and the SVN/CVS metadata will be able to live beside each other happily.

对于像文件目录这样的大文件夹,在正确"位置使用符号链接指向 webroot 之外的服务器端目录.这让您的源代码控制存储库包含所有代码和符号链接,而不是用户上传的所有代码和所有文件.

For bulky folders like the files directory, use a symlink in the 'proper' location to point to a server-side directory outside of the webroot. That lets your source control repo include all the code and a symlink, instead of all the code and all the files users have uploaded.

数据库更棘手;清理开发/暂存数据库并将其推送到上线是最简单的初始部署,但如果上线网站上的用户也在生成内容,则在执行增量数据库更新时会遇到一些问题.

Databases are trickier; cleaning up the dev/staging DB and pushing it to live is easiest for the initial rollout but there are a few wrinkles when doing incremental DB updates if users on the live site are also generating content.

去年我做了一个关于 Drupal 部署最佳实践的演讲.请随意查看幻灯片.

I did a presentation on Drupal deployment best practices last year. Feel free to check the slides out.

这篇关于什么是最好的 Drupal 部署策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆