Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Created March 1, 2013 19:01
Show Gist options
  • Save alexlovelltroy/5066918 to your computer and use it in GitHub Desktop.
Save alexlovelltroy/5066918 to your computer and use it in GitHub Desktop.
How I install multiple django apps on one host by re-using a recipe
node.django_apps.each do |key,value|
django_app = value
djangoapp_build_repo django_app.branch do
action :add
settings django_app.settings
repo django_app.repo
app_name django_app.app_name
env_root django_app.env_root
app_user django_app.app_user
not_if { File.directory? "#{django_app.env_root}/#{django_app.app_name}-env" }
end
end.
default_attributes( "django_apps" => {"myapp" => {"site_domain" => "example.com",
"env_root" => "/var/www",
"app_name" =>"bloggyblogger",
"repo" => "alexlovelltroy/bloggyblogger",
"settings" => "bloggyblogger/__init__.py",
"app_user" => "ubuntu",
"branch" => "master"
}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment