Last active
December 26, 2015 11:19
-
-
Save buccolo/7143172 to your computer and use it in GitHub Desktop.
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
# Executes nginx recipe. | |
include_recipe "detroit::nginx" | |
# Creates deploy directory with correct permissions. | |
directory "/data/www" do | |
owner "nginx" | |
group "nginx" | |
mode "755" | |
end |
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
# Deploys the given git project to the deploy directory. | |
git "/data/www" do | |
repository "[email protected]:brunobuccolo/detroit.git" | |
revision "master" | |
action :sync | |
user "nginx" | |
group "nginx" | |
end |
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
# apt-get install this package if not installed. | |
package "nginx" | |
# Use nginx.conf.erb with my attributes and variables to create the file below with correct permissions. | |
template "/etc/nginx/nginx.conf" do | |
source "nginx.conf.erb" | |
owner "root" | |
group "root" | |
mode "644" | |
end | |
# Starts nginx. | |
# Configures nginx to start at boot. | |
service "nginx" do | |
action [:start, :enable] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment