Deploy nginx reverse proxy for RSK mainnet
This commit is contained in:
parent
0e1b362644
commit
584da20d3e
|
@ -12,12 +12,13 @@
|
||||||
"hostname": "rsk-mainnet-1",
|
"hostname": "rsk-mainnet-1",
|
||||||
"ipaddress": "192.168.122.233",
|
"ipaddress": "192.168.122.233",
|
||||||
"roles": [
|
"roles": [
|
||||||
"rsk_mainnet"
|
"rskj_mainnet"
|
||||||
],
|
],
|
||||||
"recipes": [
|
"recipes": [
|
||||||
"kosmos-base",
|
"kosmos-base",
|
||||||
"kosmos-base::default",
|
"kosmos-base::default",
|
||||||
"kosmos_rsk::rskj",
|
"kosmos_rsk::rskj",
|
||||||
|
"kosmos_rsk::nginx",
|
||||||
"apt::default",
|
"apt::default",
|
||||||
"timezone_iii::default",
|
"timezone_iii::default",
|
||||||
"timezone_iii::debian",
|
"timezone_iii::debian",
|
||||||
|
@ -32,8 +33,20 @@
|
||||||
"postfix::_attributes",
|
"postfix::_attributes",
|
||||||
"postfix::sasl_auth",
|
"postfix::sasl_auth",
|
||||||
"hostname::default",
|
"hostname::default",
|
||||||
|
"kosmos_rsk::firewall",
|
||||||
"firewall::default",
|
"firewall::default",
|
||||||
"chef-sugar::default"
|
"chef-sugar::default",
|
||||||
|
"kosmos-nginx::default",
|
||||||
|
"nginx::default",
|
||||||
|
"nginx::package",
|
||||||
|
"nginx::ohai_plugin",
|
||||||
|
"nginx::repo",
|
||||||
|
"nginx::commons",
|
||||||
|
"nginx::commons_dir",
|
||||||
|
"nginx::commons_script",
|
||||||
|
"nginx::commons_conf",
|
||||||
|
"kosmos-nginx::firewall",
|
||||||
|
"kosmos-base::letsencrypt"
|
||||||
],
|
],
|
||||||
"platform": "ubuntu",
|
"platform": "ubuntu",
|
||||||
"platform_version": "20.04",
|
"platform_version": "20.04",
|
||||||
|
@ -52,6 +65,6 @@
|
||||||
},
|
},
|
||||||
"run_list": [
|
"run_list": [
|
||||||
"recipe[kosmos-base]",
|
"recipe[kosmos-base]",
|
||||||
"role[rsk_mainnet]"
|
"role[rskj_mainnet]"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,11 +0,0 @@
|
||||||
name "rsk_mainnet"
|
|
||||||
|
|
||||||
run_list %w(
|
|
||||||
kosmos_rsk::rskj
|
|
||||||
)
|
|
||||||
|
|
||||||
override_attributes(
|
|
||||||
:rskj => {
|
|
||||||
:network => "mainnet"
|
|
||||||
}
|
|
||||||
)
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
name 'rskj_mainnet'
|
||||||
|
|
||||||
|
default_attributes 'rskj' => {
|
||||||
|
'network' => 'mainnet',
|
||||||
|
'nginx' => {
|
||||||
|
'domain' => 'rsk.kosmos.org'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default_run_list = %w(
|
||||||
|
kosmos_rsk::rskj
|
||||||
|
kosmos_rsk::nginx
|
||||||
|
)
|
||||||
|
|
||||||
|
env_run_lists(
|
||||||
|
'_default' => default_run_list,
|
||||||
|
'development' => default_run_list,
|
||||||
|
'production' => default_run_list
|
||||||
|
)
|
|
@ -16,7 +16,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_pass localhost:<%= @port %>;
|
proxy_pass http://localhost:<%= @port %>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Reference in New Issue