GitAutoDeploy.py consists of a small HTTP server that listens for Web hook requests sent from GitHub, GitLab or Bitbucket servers. This application allows you to continuously and automatically deploy you projects each time you push new commits to GitHub, GitLab or Bitbucket repository.

When commits are pushed to your Git repository, the Git server will notify GitAutoDeploy.py by sending a HTTP POST request with a JSON body to a pre configured URL (your-host:8001). The JSON body contains detailed information about the repository and what event that triggered the request. GitAutoDeploy.py parses and validates the request, and if all goes well it issues a git pull.
Additionally, GitAutoDeploy.py can be configured to execute a shell command upon each successful "git pull", which can be used to trigger custom build actions.
GitAutoDeploy.conf.json.example to GitAutoDeploy.conf.jsonGitAutoDeploy.conf.json to match your project setuppidfilepath path is writable for the user running the script, as well as any other path configured for your repositories.python GitAutoDeploy.py
--daemon-mode (-d) Run in background (daemon mode) --quiet (-q) Suppress all output --ssh-keygen --force --config Specify custom configuration file
The easiest way to configure your system to automatically start GitAutoDeploy.py after a reboot is through crontab. Open crontab in edit mode using crontab -e and add the following:
@reboot /usr/bin/python /path/to/GitAutoDeploy.py --daemon-mode --quiet
initfiles/debianLSBInitScripts/gitautodeploy to /etc/init.d/chmod 755 /etc/init.d/gitautodeployGitAutoDeploy.py executable (if it isn't already): chmod 755 GitAutoDeploy.pyGitAutoDeploy.py in /opt/Gitlab_Auto_Deploy/GitAutoDeploy.py. If this is not the case, edit gitautodeploy init script and modify DAEMON and PWD.update.rc.d gitautodeploy defaultsContent type
Image
Digest
sha256:7784efd75…
Size
88.9 MB
Last updated
over 11 years ago
docker pull qnch/github-gitlab-auto-deploy