Last active
December 15, 2015 16:29
-
-
Save josip/5289412 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| God.watch do |w| | |
| w.name = "serif" | |
| w.dir = '/path/to/serif/site' | |
| w.env = {'ENV' => 'production'} | |
| w.start = "/home/sites/serif.remote.sh" | |
| w.stop = "kill `pidof serif`" | |
| w.log = '/tmp/serif.unicorn.log' | |
| w.keepalive(:memory_max => 100.megabytes, | |
| :cpu_max => 30.percent) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| HOST=jlx | |
| PASS=yourpassword | |
| echo "Starting serif..." | |
| ssh $HOST 'bash -s' <<EOL1 | |
| echo $PASS | sudo -S -u sites -- /usr/local/bin/god start serif | |
| exit | |
| EOL1 | |
| echo "SSH tunnel 8181<->4567 open" | |
| ssh -N -L 8181:localhost:4567 $HOST | |
| echo "Stopping serif..." | |
| ssh $HOST 'bash -s' <<EOL2 | |
| echo $PASS | sudo -S -u sites -- /usr/local/bin/god stop serif | |
| EOL2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| source /path/to/.rvm/environments/default | |
| serif admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment