2016-03-08 18:12:31 -05:00
|
|
|
## Setup git Remote
|
|
|
|
|
|
|
|
* Setup the Repostiory
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo su - app && cd
|
|
|
|
mkdir ~/jokes-production && cd ~/jokes-production
|
|
|
|
git init --bare
|
|
|
|
```
|
|
|
|
|
|
|
|
* Add the Hook! (~/jokes-production/hooks/post-receive)
|
|
|
|
* post-receive from [https://goo.gl/f36vHg](https://goo.gl/f36vHg)
|
|
|
|
* chmod +x hooks/post-receive
|
|
|
|
|
|
|
|
* Setup sudo
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo sh -c 'echo "app ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-app'
|
|
|
|
```
|
|
|
|
|
|
|
|
note:
|
|
|
|
- What github does when you create a new repository
|
2016-03-08 21:32:57 -05:00
|
|
|
- Should definitely restrict sudo. Just add commands necessary after.
|
|
|
|
- service puma-manager restart
|
|
|
|
- service nginx restart
|