Refactor RSK nginx sites for proxy/lb usage

This commit is contained in:
Râu Cao
2023-06-18 16:55:38 +02:00
parent 635ca3870a
commit 90f66c74d2
9 changed files with 83 additions and 36 deletions

View File

@@ -1,27 +0,0 @@
#
# Cookbook Name:: kosmos_rsk
# Recipe:: nginx
#
include_recipe "kosmos-nginx"
app_name = "rskj"
domain = node[app_name]["nginx"]["domain"]
nginx_certbot_site domain
template "#{node['nginx']['dir']}/sites-available/#{domain}" do
source "nginx_conf_#{app_name}.erb"
owner 'www-data'
mode 0640
variables app_name: app_name,
domain: domain,
port: "4444",
ssl_cert: "/etc/letsencrypt/live/#{domain}/fullchain.pem",
ssl_key: "/etc/letsencrypt/live/#{domain}/privkey.pem"
notifies :reload, 'service[nginx]', :delayed
end
nginx_site domain do
action :enable
end

View File

@@ -0,0 +1,8 @@
#
# Cookbook Name:: kosmos_rsk
# Recipe:: nginx_mainnet
#
rskj_nginx_site "mainnet" do
domain "rsk.kosmos.org"
end

View File

@@ -0,0 +1,8 @@
#
# Cookbook Name:: kosmos_rsk
# Recipe:: nginx_testnet
#
rskj_nginx_site "testnet" do
domain "rsk-testnet.kosmos.org"
end