views:

49

answers:

2

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

A: 

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.

Pekka
If I commit the initial structure of /data won't I get warnings for all future changes – "git diff" etc – or if I was to do "git commit -am" would it not include all /data changes automatically?I can see how ignoring /data completely, would work however.
RewbieNewbie
A: 

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.

Simone Carletti