Compare commits
3 Commits
79f623de4e
...
5b2ae82ce6
| Author | SHA1 | Date | |
|---|---|---|---|
|
5b2ae82ce6
|
|||
|
910817a7d4
|
|||
|
163b12efbc
|
@@ -8,3 +8,4 @@ version '0.1.0'
|
|||||||
chef_version '>= 14.0'
|
chef_version '>= 14.0'
|
||||||
|
|
||||||
depends "kosmos-nginx"
|
depends "kosmos-nginx"
|
||||||
|
depends 'firewall'
|
||||||
|
|||||||
@@ -32,3 +32,12 @@ systemd_unit "discourse.service" do
|
|||||||
}})
|
}})
|
||||||
action [:create, :enable]
|
action [:create, :enable]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
include_recipe 'firewall'
|
||||||
|
|
||||||
|
firewall_rule 'discourse' do
|
||||||
|
port [3001]
|
||||||
|
source "10.1.1.0/24"
|
||||||
|
protocol :tcp
|
||||||
|
command :allow
|
||||||
|
end
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ end
|
|||||||
# No Discourse host, stop here
|
# No Discourse host, stop here
|
||||||
return if upstream_ip_addresses.empty?
|
return if upstream_ip_addresses.empty?
|
||||||
|
|
||||||
|
nginx_certbot_site domain
|
||||||
|
|
||||||
template "#{node['nginx']['dir']}/sites-available/#{domain}" do
|
template "#{node['nginx']['dir']}/sites-available/#{domain}" do
|
||||||
source "nginx_conf.erb"
|
source "nginx_conf.erb"
|
||||||
owner 'www-data'
|
owner 'www-data'
|
||||||
@@ -28,5 +30,3 @@ end
|
|||||||
nginx_site domain do
|
nginx_site domain do
|
||||||
action :enable
|
action :enable
|
||||||
end
|
end
|
||||||
|
|
||||||
nginx_certbot_site domain
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ server {
|
|||||||
|
|
||||||
# Send real IP to the Docker container
|
# Send real IP to the Docker container
|
||||||
set_real_ip_from 127.0.0.1;
|
set_real_ip_from 127.0.0.1;
|
||||||
set_real_ip_from 172.17.0.1;
|
|
||||||
real_ip_header X-Forwarded-For;
|
real_ip_header X-Forwarded-For;
|
||||||
|
|
||||||
client_max_body_size 20M;
|
client_max_body_size 20M;
|
||||||
|
|||||||
Reference in New Issue
Block a user