Last active
December 25, 2015 05:09
-
-
Save PaulOstazeski/6922007 to your computer and use it in GitHub Desktop.
A broken chef recipe to deploy a rails application
This file contains 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
maintainer "me" | |
maintainer_email "me@my.company.com" | |
license "All rights reserved" | |
description "Installs/Configures myproject" | |
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | |
version "0.0.1" | |
depends 'hostsfile' | |
depends 'database' | |
depends 'postgresql' | |
depends 'application' | |
depends 'application_ruby' |
This file contains 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
hostsfile_entry '127.0.0.1' do | |
hostname "#{node['fqdn']} #{node['hostname']} localhost" | |
end | |
(node['myproject']['hosts'] || {}).each_pair do |name, ip| | |
hostsfile_entry ip do | |
hostname name | |
end | |
end | |
application 'myproject' do | |
path '/home/myproject/app' | |
owner 'myproject' | |
group 'myproject' | |
repository 'git@github.com:myproject/myproject.git' | |
revision 'master' | |
deploy_key IO.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'ssh_key')) | |
rails do | |
bundler true | |
# database do | |
# database "myproject" | |
# username "myproject" | |
# password node['myproject']['database_password'] | |
# end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment