# Recipe:: nodejs app with authbind
package "unzip"
gem_package "crack"
versions = search(:my_services, "*:*")
if !node.roles.select { |role| role == "private_deployment" }.empty?
Chef::Log.info("Server running in Private environment")
environment = "MyApp-Private"
end
# Required by the template .erb which uses authbind
package "authbind" do
action :install
not_if { File.directory?("/etc/authbind") }
end
file "/etc/authbind/byport/443" do
owner "nobody"
group "nogroup"
mode "0750"
action :create
not_if { File.exists?("/etc/authbind/byport/443") }
end
myapp "service" do
env environment
version versions.select {|s| s.id == environment}.first
end