3 Commits

4 changed files with 12 additions and 3 deletions

View File

@@ -8,3 +8,4 @@ version '0.1.0'
chef_version '>= 14.0'
depends "kosmos-nginx"
depends 'firewall'

View File

@@ -32,3 +32,12 @@ systemd_unit "discourse.service" do
}})
action [:create, :enable]
end
include_recipe 'firewall'
firewall_rule 'discourse' do
port [3001]
source "10.1.1.0/24"
protocol :tcp
command :allow
end

View File

@@ -12,6 +12,8 @@ end
# No Discourse host, stop here
return if upstream_ip_addresses.empty?
nginx_certbot_site domain
template "#{node['nginx']['dir']}/sites-available/#{domain}" do
source "nginx_conf.erb"
owner 'www-data'
@@ -28,5 +30,3 @@ end
nginx_site domain do
action :enable
end
nginx_certbot_site domain

View File

@@ -18,7 +18,6 @@ server {
# Send real IP to the Docker container
set_real_ip_from 127.0.0.1;
set_real_ip_from 172.17.0.1;
real_ip_header X-Forwarded-For;
client_max_body_size 20M;