3 ms·
It works like magic, but it's also extremely simple to DIY if you wanna learn. If you set up a server, you can create a git repo by just doing `git init --bare
by myaccountonhn 2y ago
It works like magic, but it's also extremely simple to DIY if you wanna learn.
If you set up a server, you can create a git repo by just doing `git init --bare`, add the setting `git config receive.denyCurrentBranch updateInstead`.
After that you can use git hooks (more specifically push-to-checkout hook), to receive uploads, compile and launch. The hook will just be a simple shell script, the most basic version could be a variant of `compile && install && systemctl restart service`.
From there you'll be able to copy the repo locally and pushing your changes will now trigger the hook you've setup.
git clone root@yourserver.com:/path/to/git/folder
- rcarmo 2y agoYou just described Piku, except that it’s a Python script that also sets up nginx and a process supervisor for your code :)
- myaccountonhn 2y agoYeah I love the simplicity of Piku, being able to actually understand what is happening behind the scenes is a great quality. :)
- tasuki 2y agoI've been doing almost exactly this. Have set up Ansible to automate it. Why would I want to use Piku? Would it give me some benefits I currently don't have?
- gasparto 2y agoI guess the benefit of piku comes with the ease of use for developers who don't know lots about system administration/infrastructure. Spinning up a server and installing a repo on it is easy. Depends on your use case and on what you know/have. I prefer ansible or jenkins+scp-build-to-server+run-deploy.script I added it to my tools list in case i need sth quick'n working for a small team/to recommend when there's no ansible/sysadmin knowledge available. (I haven't looked into piku but i guess you'll hit its limitation once you have more complex deployment schemes, privilege/access management, ...)