Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi chaps and chapesses!

I'm new to both GIT and CouchCMS so go easy on me!

I have a website which I'm developing as a GIT project - the git folder of which resides at:

https://www.mysite.tld/.git

I want to clone CouchCMS into a folder such that I can easily pull in the latest version whenever there's an new master commit to the CouchCMS public repo.

So I made folder:

https://www.mysite.tld/cms/

And added that to my .gitignore so GIT wouldn't throw a tantrum about a nested repo.

I then pulled in CouchCMS to there with:

git clone https://github.com/CouchCMS/CouchCMS .

This pulls in CouchCMS and sticks it in here:

https://www.mysite.tld/cms/couch/

And I can run 'git pull' to update it as required. Nice!

All went well until I 'invoked' couch in my first template then BOSH I get this:

ERROR: 'couch' folder should reside in the main web-site folder

Is there a way to have couch in a sub folder below the site root? Or a way to clone couch into a folder of my choosing without interfering with my existing repo?

TY!!!
I have solved this myself. Here's how...

Instead of cloning CouchCMS into (say):

Code: Select all
    /home/mysite/public_html/


So that the main couch directory is:

Code: Select all
    /home/mysite/public_html/couch


I cloned it to:

Code: Select all
    /home/mysite/cms/


So that the main couch directory is:

Code: Select all
    /home/mysite/cms/couch


In public_html I then created a symlink as follows:

Code: Select all
    ln -s /home/mysite/cms/couch /home/mysite/public_html/couch


And then at the very very top of the config file:

Code: Select all
    /home/mysite/cms/couch/config.php


I put:

Code: Select all
    <?php
        define('K_COUCH_DIR', '/home/mysite/public_html/couch/');
        define('K_SITE_DIR',  '/home/mysite/public_html/' );
       
        # rest of config file as usual...
        if ( !defined('K_COUCH_DIR') ) die(); // cannot be loaded directly


This works because the 'real' couch directory is the same number of levels above / (root) as the real site root.

This leaves me free and clear to have another .git repo directly in public_html, in which I add 'couch' to the .gitignore file.

Hey presto!
2 posts Page 1 of 1