|Marcel Kapfer 06cf7ce6e5||1 year ago|
|res||3 years ago|
|CHANGELOG.md||3 years ago|
|LICENSE.md||3 years ago|
|README.md||1 year ago|
|config.example.json||3 years ago|
|quick-deploy.php||3 years ago|
Quick Deploy is a simple PHP-based solution for continuous delivery without any dependencies.
See also my corresponding blog post.
You have a Git server (like Gitea, but just a bare repo should also work) where you host a repo that you want to deploy somewhere. The somewhere (same or other server) has a Web Server with PHP capabilities running (my use case: I develop a TYPO3 site package, TYPO3 runs on PHP). In your Git repo (server-side) you define post-receive Git hook which just sends a simple HTTP GET request your deploy-server (over HTTTPS, of course) like https://example.com/quick-deploy.php?secret=YOUR_SECRET. Where your secret is known to you, your git post-receive hook and the quick-deploy script. If the given secret matches the predefinded than a pull request in the given repository is attempted. It git fails, a 500 error will be returned. Additionally the git output will be printed.
- Download the
quick-deploy.phpscript and the
config.example.jsonin a public accesible folder on your server where you want to deploy your code.
- Create a secret. For example run
openssl rand -base64 42
- Copy (or rename) the
config.example.jsonand edit it to your liking. You can find a list of options and their requirement later. Remove the example file afterwards.
- Set correct permissions on
config.json. It needs to be readable by the
quick-deploy.phpscript (presumably run by the user
www-data) but must not be accessible over the web. Otherwise your secret is no longer one.
chmod 600 config.jsonshould do that.
- Create g Git post-receive-hook in your Git repository like the following:
#!/bin/sh curl https://your.deploy.server/quick-deploy.php?secret=YOUR_SECRET
Here is a alphabetically list of possible configuration variables and if it is necessary that their set.
||No||Branch which should be used|
||N/A||Yes||Path of the deployed git repository|
||N/A||Yes||Path or URL of the remote Git repository|
||N/A||Yes||Secret which is exchanged as GET paramter|
Feel free to contribute if you want to.