如何最好地在我的 Rails 应用程序中部署 DokuWiki?

发布于 2024-08-21 10:48:44 字数 292 浏览 3 评论 0原文

我想在我的Rails应用程序中安装DokuWiki(位于domain.com/wiki)

  1. 最好将其解压缩并安装在public/wiki中吗?
  2. 我不想每次处理我的应用程序时都必须提交/推送/拉取 DokuWiki 页面。您是否建议告诉 git 完全忽略 wiki 目录?或者是否有更好的方法来做到这一点,例如忽略 /wiki 中平面文件的位置?

理想情况下,我对实际 wiki 源代码所做的所有更改都将具有修订控制,但创作的 wiki 页面则不会。

您的想法和经验将不胜感激。谢谢

I would like to install DokuWiki within my Rails application at domain.com/wiki

  1. Would it be best to unzip and install it in public/wiki?
  2. I don't want to have to commit/push/pull DokuWiki pages every time I'm working on my application. Would you suggest telling git to ignore the wiki directory entirely? or is there a better way to do this, such a ignoring the location of the flat files within the /wiki?

Ideally all changes I make to the actual wiki source code will have revision control but the authored wiki pages wouldn't.

Your thoughts and experiences would be appreciated. Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

相思故 2024-08-28 10:48:44

AFAIK,DokuWiki 是一个 PHP 应用程序。如果您想在同一台服务器上部署应用程序,最简单的解决方案(但不是最有效的解决方案)是使用 Passenger (mod_rails) 和 mod_php (或 PHP 页面的等效解决方案)设置 Apache。

然后,配置虚拟主机以使用乘客。选择要部署 DokuWiki 的文件夹并为其禁用 Passenger。该文档显示了 WordPress 安装的类似解决方案。

最后,从版本控制中排除 DokuWiki 文件夹。

如果您使用 Capistrano,我还建议您将 DokuWiki 部署在单独的文件夹上,并在每次部署新版本的 Rails 应用程序时使用 Capistrano 创建符号链接。这样,您就不需要在每次部署 Rails 应用程序时都处理 DokuWiki 文件夹。

AFAIK, DokuWiki is a PHP Application. If you want to deploy your application on the same server, the most simple solution (but not the most efficient one) is to setup Apache with Passenger (mod_rails) and mod_php (or equivalent solution for PHP pages).

Then, configure the vhost for using passenger. Choose the folder where you want to deploy DokuWiki and disable Passenger for it. The documentation shows a similar solution for a WordPress installation.

Finally, exclude the DokuWiki folder from version control.

If you use Capistrano, I also suggest you to deploy DokuWiki on a separate folder and use Capistrano to create a symlink each time you deploy a new version of your Rails application. In this way, you don't need to deal with the DokuWiki folder each time you deploy your Rails application.

以酷 2024-08-28 10:48:44

我不了解 Rails,所以我不能给你关于 1.) 的答案,但是关于 2.),我发现忽略 /data 目录就足以阻止实际的 wiki 内容从被承诺。

也许可以在 /data 中提交初始结构(全新安装后的状态),这样您的存储库中就有一个完整的结构。

I don't know about Rails so I can't give you an answer on 1.) but re 2.), I have found that it's enough to ignore the /data directory to prevent actual wiki contents from being committed.

Maybe commit the initial structure in /data (the status it has directly after a fresh installation) so you have an intact structure in your repository.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文