I want to git push to server repo, and then post-update hook will pull lastest repo to deploy folder, and restart the daemon.
but git user can not access deploy folder and can't restart the daemon.
How can I do git push deployment as heroku.
I want to git push to server repo, and then post-update hook will pull lastest repo to deploy folder, and restart the daemon.
but git user can not access deploy folder and can't restart the daemon.
How can I do git push deployment as heroku.
You could use a similar mechanism than the push on Heroku: a ssh-based operation.
Your git user on the server side (i.e. the git user running the post-update
hook) would called a deployment script through rsh, which means that git user account has:
$HOME/.ssh/authorized_keys
of the server user (i.e. the user able to access the deploy folder and who owns the daemon process)$HOME/.ssh
)