Simple, easy deployment of software from a Git repo.
- Node.JS 8 or newer
- Tested on GNU/Linux and macOS
Just clone this repository and run npm install
, yarn
or install the node modules with the package manager of your choice.
Edit the settings/config.json
file, where you can change the port in which the service listens to requests, the secret it uses, and the directories where there's a repo to pull.
It is not recommended to set a different secret than the one generated, for security reasons. You can do that if you want, but it could be predicted with dictionaries.
If no config.json
file is found, or if it gets corrupted, run the script with the --reconfigure
parameter.
Make a Webhook pointing to your AutoDeploy URL (e.g. http://example.com:3000/deploy?key=SECRET). When you make a push, a request will be triggered to the service.
Run it with a user that has permissions in all folders, in order for the pulls to succeed.
Do you need to run a post-commit command? Like cleaning cache or restarting a service? Create a script called postinstall.sh
(UNIX) or postinstall.cmd
(Windows) with the needed commands. This program will run it for you.
Make a GET request like this:
http://example.com:3000/deploy?key=SECRET
If you want to contribute or have any suggestion/report, please make a pull request or open an issue. Donations are welcome!
Depends. Do you just need to run git pull
and a couple commands? Then yes. Do you need to recompile the whole kernel and do system-critical stuff? It can, but it's up to you.
Nope. If you do use such systems, please consider upgrade them to git.
Yes it does! This only runs git pull
on the directories you specify on its settings.
This happens when the request to the auto-deploy server is done though a web browser (typing the URL and entering it, not making any sort of XHR). It can be prevented with a firewall or any sort of source IP whitelist.