Don't run the Let's Encrypt set up in development
This commit is contained in:
parent
c9879a60e2
commit
d6cc8509bc
@ -2,14 +2,14 @@
|
|||||||
# Cookbook Name:: sockethub
|
# Cookbook Name:: sockethub
|
||||||
# Recipe:: proxy
|
# Recipe:: proxy
|
||||||
#
|
#
|
||||||
# Copyright 2015, Kosmos
|
# Copyright 2015-2017, Kosmos
|
||||||
#
|
#
|
||||||
# All rights reserved - Do Not Redistribute
|
# All rights reserved - Do Not Redistribute
|
||||||
#
|
#
|
||||||
|
|
||||||
include_recipe "kosmos-base::letsencrypt"
|
|
||||||
|
|
||||||
unless node.chef_environment == "development"
|
unless node.chef_environment == "development"
|
||||||
|
include_recipe "kosmos-base::letsencrypt"
|
||||||
|
|
||||||
include_recipe "firewall"
|
include_recipe "firewall"
|
||||||
firewall_rule 'sockethub' do
|
firewall_rule 'sockethub' do
|
||||||
port node['sockethub']['external_port'].to_i
|
port node['sockethub']['external_port'].to_i
|
||||||
@ -21,9 +21,10 @@ end
|
|||||||
include_recipe 'kosmos-nginx'
|
include_recipe 'kosmos-nginx'
|
||||||
|
|
||||||
directory "/var/www/sockethub" do
|
directory "/var/www/sockethub" do
|
||||||
owner node["nginx"]["user"]
|
owner node["nginx"]["user"]
|
||||||
group node["nginx"]["group"]
|
group node["nginx"]["group"]
|
||||||
action :create
|
action :create
|
||||||
|
recursive true
|
||||||
end
|
end
|
||||||
|
|
||||||
include_recipe 'kosmos-nginx'
|
include_recipe 'kosmos-nginx'
|
||||||
@ -40,11 +41,13 @@ template "#{node['nginx']['dir']}/sites-available/sockethub" do
|
|||||||
notifies :reload, 'service[nginx]', :delayed
|
notifies :reload, 'service[nginx]', :delayed
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "letsencrypt cert for sockethub.kosmos.org" do
|
unless node.chef_environment == "development"
|
||||||
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/sockethub -d sockethub.kosmos.org -n"
|
execute "letsencrypt cert for sockethub.kosmos.org" do
|
||||||
cwd "/usr/local/certbot"
|
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/sockethub -d sockethub.kosmos.org -n"
|
||||||
not_if { File.exist? "/etc/letsencrypt/live/sockethub.kosmos.org/fullchain.pem" }
|
cwd "/usr/local/certbot"
|
||||||
notifies :reload, "service[nginx]", :delayed
|
not_if { File.exist? "/etc/letsencrypt/live/sockethub.kosmos.org/fullchain.pem" }
|
||||||
|
notifies :reload, "service[nginx]", :delayed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
nginx_site 'sockethub' do
|
nginx_site 'sockethub' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user