Skip to content

Instantly share code, notes, and snippets.

@daniellockard
Created February 28, 2014 17:32
Show Gist options
  • Save daniellockard/9275593 to your computer and use it in GitHub Desktop.
Save daniellockard/9275593 to your computer and use it in GitHub Desktop.
package "nginx" do
action :install
end
package "php-fpm" do
action :install
end
service "nginx" do
action [:start,:enable]
end
service "php-fpm" do
action [:start,:enable]
end
directory "/var/www" do
action :create
recursive true
end
file "/etc/nginx/conf.d/cathealthcare.conf" do
action :create
content ::File.open("/root/files/cathealthcare.conf").read
notifies :restart, "service[nginx]", :delayed
end
file "/etc/nginx/cert.pem" do
action :create
content ::File.open("/root/files/cert.pem").read
notifies :restart, "service[nginx]", :delayed
end
file "/etc/nginx/chc.passwd" do
action :create
content ::File.open("/root/files/chc.passwd").read
notifies :restart, "service[nginx]", :delayed
end
bash "unpack_site" do
code "/bin/tar -C /var/www -zxf /root/files/cathealthcare.tar.gz"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment