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
mkdir /path/to/local-repos | |
git clone ssh://your.remote.server/path/to/git-repos/NewRepoName | |
git remote rename origin deploy |
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
// Initialise empty strings | |
var gitOutput = "", | |
branch = null; | |
// Start reading stdin | |
process.stdin.resume(); | |
// Store read in chunks | |
process.stdin.on('data', function (chunk) { | |
gitOutput += chunk; |
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
// Initialise vars | |
var gitOutput = "", | |
branch = null; | |
// Start reading stdin | |
process.stdin.resume(); | |
// Store read in chunks | |
process.stdin.on('data', function (chunk) { | |
gitOutput += chunk; |
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
// Initialise vars | |
var gitOutput = "", | |
branch = null; | |
// Start reading stdin | |
process.stdin.resume(); | |
// Store read in chunks | |
process.stdin.on('data', function (chunk) { | |
gitOutput += chunk; |
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
|-- /var/w/ | |
|-- .versions/ | |
|-- [email protected] | |
|-- [email protected] | |
|-- [email protected] | |
|-- [email protected] | |
|-- [email protected] | |
|-- SiteName (symlink) | |
|-- AnotherSite (symlink) |
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
|-- /var/w/ | |
|-- .versions/ | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
|-- SiteName (symlink) | |
|-- AnotherSite (symlink) |
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
|-- /var/w/ | |
|-- .versions/ | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
|-- SiteName --> [email protected] (symlink) | |
|-- AnotherSite --> [email protected] (symlink) |
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
|-- /var/w/ | |
|-- .versions/ | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
| |-- [email protected] | |
|-- SiteName --> [email protected] (symlink) | |
|-- AnotherSite --> [email protected] (symlink) |
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
#!upstart | |
description "Sitename-state" | |
author "Ben Gourley" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn # restart when job dies | |
respawn limit 5 60 # give up restart after 5 respawns in 60 seconds |
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
set daemon 300 with start delay 60 | |
check host BenGourley-dev with address 127.0.0.1 | |
start "/sbin/start site.BenGourley-dev" | |
stop "/sbin/stop site.BenGourley-dev" | |
if failed port 3000 protocol HTTP | |
request / | |
with timeout 5 seconds | |
then restart |