Skip to content

Instantly share code, notes, and snippets.

View wottpal's full-sized avatar

Dennis Zoma wottpal

View GitHub Profile
@wottpal
wottpal / post-receive
Last active July 22, 2019 09:39
Kirby Git Deploy Hook
#!/bin/bash
# IMPORTANT REQUIREMENTS
# * Make sure the git-user is allowed to perform operations on behalf of
# www-data (without password) by adding this line to `/etc/sudoers`:
# `git ALL=(www-data) NOPASSWD: /usr/bin/git, /bin/mkdir`
# * Make sure `var/www` is owned by www-data:www-data by executing
# `sudo chown -R www-data:www-data /var/www`
# * Add www-data to the git-group by executing `sudo usermod -a -G git www-data`
# * Make sure this file is executable by executing