How to setup hgdrops.¶
Setup site config¶
Create a json file in your homedir under the folder ~/.hgdrops named sites.json
Make the php interface available trough a webserver¶
Configure the config file to whitelist the clients from which you want to connect to hgdrops, and make sure it holds the location to your sites.json file
Make sure that the index.php, css and image files can be browsed to from a webserver
Clone the repos¶
Make a clone of the repository which hgdrops can use. The repository will frequently change state if there are changes being requested by your settings. Using a separate copy is required.
You can now add sites that are located in subfolders of your repository to config by using the web interface or the json file.
The source is relative to the repository (for example sites/somtesite.com)
The destination is absolute. (for example /var/www/somesite.com)
Test the setup¶
You can test the setup of hgdrops with various flags. Since your target destinations will either be empty, or will not have the correct version, hgdrops will change the repository to each requested version and start rscyning the files from the repos to the targets. The -v (verbose) en -d (debug) flags might help you if you see any errors, or no change at the target directories.
The -i argument tells hgdrops where to locate its sites.json file
The -p arguments dictates the location of the repository
Create a cronjob¶
Setup a cronjob to periodically run the hgdrops.py script with a user that can read/write the repository and target destinations.