Compare commits
No commits in common. "ec9b912e45690c95bb7b972d06929ad4e103efde" and "cdedf49be32202c020aab5c6bff6d0edacadc14d" have entirely different histories.
ec9b912e45
...
cdedf49be3
@ -57,7 +57,6 @@
|
||||
"kosmos_strfry::nginx",
|
||||
"kosmos_website",
|
||||
"kosmos_website::default",
|
||||
"kosmos_website::redirects",
|
||||
"kosmos-akkounts::nginx",
|
||||
"kosmos-akkounts::nginx_api",
|
||||
"kosmos-bitcoin::nginx_lndhub",
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
"kosmos_strfry::nginx",
|
||||
"kosmos_website",
|
||||
"kosmos_website::default",
|
||||
"kosmos_website::redirects",
|
||||
"kosmos-akkounts::nginx",
|
||||
"kosmos-akkounts::nginx_api",
|
||||
"kosmos-bitcoin::nginx_lndhub",
|
||||
|
||||
@ -30,7 +30,6 @@ production_run_list = %w(
|
||||
kosmos_rsk::nginx_mainnet
|
||||
kosmos_strfry::nginx
|
||||
kosmos_website::default
|
||||
kosmos_website::redirects
|
||||
kosmos-akkounts::nginx
|
||||
kosmos-akkounts::nginx_api
|
||||
kosmos-bitcoin::nginx_lndhub
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
node.default["kosmos_website"]["domain"] = "kosmos.org"
|
||||
node.default["kosmos_website"]["repo"] = "https://gitea.kosmos.org/kosmos/website.git"
|
||||
node.default["kosmos_website"]["revision"] = "chore/content"
|
||||
node.default["kosmos_website"]["accounts_url"] = "https://accounts.kosmos.org"
|
||||
node.default["kosmos_website"]["domain"] = "kosmos.org"
|
||||
node.default["kosmos_website"]["repo"] = "https://gitea.kosmos.org/kosmos/website.git"
|
||||
node.default["kosmos_website"]["revision"] = "chore/content"
|
||||
|
||||
@ -23,7 +23,6 @@ end
|
||||
openresty_site domain do
|
||||
template "nginx_conf_website.erb"
|
||||
variables domain: domain,
|
||||
accounts_url: node.default["kosmos_website"]["accounts_url"],
|
||||
ssl_cert: "/etc/letsencrypt/live/#{domain}/fullchain.pem",
|
||||
ssl_key: "/etc/letsencrypt/live/#{domain}/privkey.pem"
|
||||
end
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Cookbook:: kosmos_website
|
||||
# Recipe:: redirects
|
||||
#
|
||||
|
||||
redirects = [
|
||||
{
|
||||
domain: "kosmos.chat",
|
||||
target: "https://kosmos.org",
|
||||
http_status: 307
|
||||
},
|
||||
{
|
||||
domain: "kosmos.cash",
|
||||
acme_domain: "letsencrypt.kosmos.org",
|
||||
target: "https://kosmos.org",
|
||||
http_status: 307
|
||||
}
|
||||
]
|
||||
|
||||
redirects.each do |redirect|
|
||||
tls_cert_for redirect[:domain] do
|
||||
auth "gandi_dns"
|
||||
acme_domain redirect[:acme_domain] unless redirect[:acme_domain].nil?
|
||||
action :create
|
||||
end
|
||||
|
||||
openresty_site redirect[:domain] do
|
||||
template "nginx_conf_redirect.erb"
|
||||
variables domain: redirect[:domain],
|
||||
target: redirect[:target],
|
||||
http_status: redirect[:http_status],
|
||||
ssl_cert: "/etc/letsencrypt/live/#{redirect[:domain]}/fullchain.pem",
|
||||
ssl_key: "/etc/letsencrypt/live/#{redirect[:domain]}/privkey.pem"
|
||||
end
|
||||
end
|
||||
@ -1,20 +0,0 @@
|
||||
# Generated by Chef
|
||||
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log;
|
||||
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
|
||||
|
||||
gzip_static on;
|
||||
gzip_comp_level 5;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
location / {
|
||||
return <%= @http_status || 301 %> <%= @target %>;
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
# Generated by Chef
|
||||
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
root /var/www/<%= @domain %>/public;
|
||||
|
||||
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log;
|
||||
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
|
||||
|
||||
gzip_static on;
|
||||
gzip_comp_level 5;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
}
|
||||
@ -1,18 +1,9 @@
|
||||
# Generated by Chef
|
||||
|
||||
server {
|
||||
server_name _;
|
||||
listen 80 default_server;
|
||||
|
||||
location / {
|
||||
return 301 https://<%= @domain %>;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
root /var/www/<%= @domain %>/public;
|
||||
|
||||
@ -27,10 +18,8 @@ server {
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
<% if @accounts_url %>
|
||||
location ~ ^/.well-known/(webfinger|nostr|lnurlp|keysend) {
|
||||
proxy_ssl_server_name on;
|
||||
proxy_pass https://accounts.kosmos.org;
|
||||
}
|
||||
<% end %>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user