Skip to content

Instantly share code, notes, and snippets.

@ezmobius
Created May 2, 2009 19:29
Show Gist options
  • Save ezmobius/105680 to your computer and use it in GitHub Desktop.
Save ezmobius/105680 to your computer and use it in GitHub Desktop.
# JSON
{
"applications": [
{
"foobar": {
"migration_command": "rake db:migrate",
"branch": "HEAD",
"deploy_action": "deploy",
"framework_env": "production",
"user": "ez",
"revision": "0xdeadbeef",
"repository_name": "git:\/\/...",
"run_migrations": true,
"run_deploy": true
}
}
]
}
# recipe
node[:applications].each do |app, data|
next unless data[:run_deploy]
deploy "/data/#{app}" do
repo data[:repository_name]
branch data[:branch]
environment data[:framework_env]
user data[:user]
restart_command "touch /data/#{app}/current/tmp/restart.txt"
revision data[:revision]
migrate data[:run_migrations]
migration_command data[:migration_command]
action data[:deploy_action]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment