Created
May 2, 2009 19:29
-
-
Save ezmobius/105680 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
# 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