Compare commits
8 Commits
e3559119be
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
be8278fbdc
|
|||
| ff3f05452f | |||
|
|
1fb66092fc | ||
|
|
81691f7e21 | ||
| e9dff82628 | |||
|
0933e9caa0
|
|||
| 9f862a89cc | |||
|
039dbdf091
|
@@ -12,6 +12,7 @@
|
||||
},
|
||||
"openresty": {
|
||||
"listen_ip": "148.251.237.111",
|
||||
"listen_ipv6": "2a01:4f8:202:804a::2",
|
||||
"log_formats": {
|
||||
"json": "{\"ip\":\"$remote_addr\",\"time\":\"$time_local\",\"host\":\"$host\",\"method\":\"$request_method\",\"uri\":\"$uri\",\"status\":$status,\"size\":$body_bytes_sent,\"referer\":\"$http_referer\",\"upstream_addr\":\"$upstream_addr\",\"upstream_response_time\":\"$upstream_response_time\",\"ua\":\"$http_user_agent\"}"
|
||||
}
|
||||
|
||||
@@ -50,13 +50,6 @@
|
||||
"postfix::sasl_auth",
|
||||
"hostname::default",
|
||||
"firewall::default",
|
||||
"kosmos_gitea::compile_from_source",
|
||||
"git::default",
|
||||
"git::package",
|
||||
"kosmos-nodejs::default",
|
||||
"nodejs::nodejs_from_package",
|
||||
"nodejs::repo",
|
||||
"golang::default",
|
||||
"backup::default",
|
||||
"logrotate::default"
|
||||
],
|
||||
|
||||
@@ -8,8 +8,8 @@ run_list %w(
|
||||
|
||||
override_attributes(
|
||||
"gitea" => {
|
||||
"repo" => "https://github.com/67P/gitea.git",
|
||||
"revision" => "ldap_sync",
|
||||
# "repo" => "https://github.com/67P/gitea.git",
|
||||
# "revision" => "ldap_sync",
|
||||
"log" => { "level" => "Info" }
|
||||
},
|
||||
)
|
||||
|
||||
@@ -8,8 +8,8 @@ upstream _<%= @upstream_name %> {
|
||||
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
@@ -11,7 +11,7 @@ proxy_cache_path <%= node[:openresty][:cache_dir] %>/akkounts levels=1:2
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @domain %>;
|
||||
|
||||
if ($host != $server_name) {
|
||||
|
||||
@@ -7,7 +7,7 @@ upstream _akkounts_api {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @domain %>;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
|
||||
@@ -49,7 +49,7 @@ server {
|
||||
client_max_body_size 100M;
|
||||
server_name <%= @server_name %>;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
access_log <%= node[:nginx][:log_dir] %>/btcpayserver.access.log json;
|
||||
error_log <%= node[:nginx][:log_dir] %>/btcpayserver.error.log warn;
|
||||
|
||||
@@ -7,7 +7,7 @@ upstream _lndhub {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=15768000";
|
||||
|
||||
@@ -49,7 +49,7 @@ server {
|
||||
server_name <%= @server_name %>;
|
||||
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
<% else -%>
|
||||
listen 80;
|
||||
<% end -%>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
|
||||
@@ -7,7 +7,7 @@ upstream _express_<%= @server_name.gsub(".", "_") %> {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=15768000";
|
||||
|
||||
@@ -12,7 +12,7 @@ upstream _ipfs_api {
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
access_log /var/log/nginx/<%= @server_name %>.access.log;
|
||||
error_log /var/log/nginx/<%= @server_name %>.error.log;
|
||||
|
||||
@@ -21,7 +21,7 @@ proxy_cache_path /var/cache/nginx/mastodon levels=1:2
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
include <%= @shared_config_path %>;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @domain %>;
|
||||
|
||||
root /var/www/<%= @domain %>/site;
|
||||
|
||||
@@ -9,7 +9,7 @@ upstream _discourse {
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
@@ -8,7 +8,7 @@ upstream _drone {
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
@@ -4,7 +4,7 @@ upstream garage_s3 {
|
||||
|
||||
server {
|
||||
listen <%= "#{node[:openresty][:listen_ip]}:" if node[:openresty][:listen_ip] %>443 ssl http2;
|
||||
listen [::]:443 http2 ssl;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
server {
|
||||
listen <%= "#{node[:openresty][:listen_ip]}:" if node[:openresty][:listen_ip] %>443 ssl http2;
|
||||
listen [::]:443 http2 ssl;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
node.default["gitea"]["version"] = "1.23.8"
|
||||
node.default["gitea"]["checksum"] = "827037e7ca940866918abc62a7488736923396c467fcb4acd0dd9829bb6a6f4c"
|
||||
node.default["gitea"]["version"] = "1.25.4"
|
||||
node.default["gitea"]["checksum"] = "a3031853e67c53714728ef705642c9046a11fb0ea356aff592e23efe6114607d"
|
||||
node.default["gitea"]["repo"] = nil
|
||||
node.default["gitea"]["revision"] = nil
|
||||
node.default["gitea"]["working_directory"] = "/var/lib/gitea"
|
||||
@@ -22,5 +22,5 @@ node.default["gitea"]["config"] = {
|
||||
}
|
||||
}
|
||||
|
||||
node.default["gitea"]["act_runner"]["version"] = "0.2.6"
|
||||
node.default["gitea"]["act_runner"]["checksum"] = "234c2bdb871e7b0bfb84697f353395bfc7819faf9f0c0443845868b64a041057"
|
||||
node.default["gitea"]["act_runner"]["version"] = "0.2.13"
|
||||
node.default["gitea"]["act_runner"]["checksum"] = "3acac8b506ac8cadc88a55155b5d6378f0fab0b8f62d1e0c0450f4ccd69733e2"
|
||||
|
||||
@@ -129,7 +129,7 @@ template "/etc/systemd/system/gitea.service" do
|
||||
git_home_directory: git_home_directory,
|
||||
config_directory: config_directory,
|
||||
gitea_binary_path: gitea_binary_path
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
notifies :run, "execute[systemctl daemon-reload]", :immediately
|
||||
end
|
||||
|
||||
service "gitea" do
|
||||
|
||||
@@ -4,5 +4,6 @@ upstream _gitea_ssh {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>22;
|
||||
listen [::]:22;
|
||||
proxy_pass _gitea_ssh;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ upstream _gitea_web {
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
@@ -12,7 +12,7 @@ upstream _<%= @app_name %> {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
access_log <%= node[:nginx][:log_dir] %>/<%= @app_name %>.access.log; # TODO json_liquor_cabinet;
|
||||
|
||||
1
site-cookbooks/kosmos_openresty/attributes/default.rb
Normal file
1
site-cookbooks/kosmos_openresty/attributes/default.rb
Normal file
@@ -0,0 +1 @@
|
||||
node.default["openresty"]["listen_ipv6"] = "::"
|
||||
@@ -6,7 +6,7 @@ upstream _<%= @upstream_name %> {
|
||||
|
||||
server {
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
server_name <%= @domain %>;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ upstream _substr {
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
access_log "/var/log/nginx/<%= @domain %>.access.log";
|
||||
error_log "/var/log/nginx/<%= @domain %>.error.log";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log;
|
||||
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
server {
|
||||
server_name <%= @domain %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
root /var/www/<%= @domain %>/public;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
server {
|
||||
server_name _;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>80 default_server;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:80 default_server;
|
||||
|
||||
location / {
|
||||
return 301 https://<%= @domain %>;
|
||||
@@ -12,7 +13,7 @@ server {
|
||||
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_ipv6']}]" %>:443 ssl http2 default_server;
|
||||
|
||||
if ($host != $server_name) {
|
||||
return 307 $scheme://$server_name;
|
||||
|
||||
@@ -5,8 +5,8 @@ upstream _<%= @app_name %> {
|
||||
|
||||
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
server_name <%= @server_name %>;
|
||||
|
||||
access_log <%= node[:nginx][:log_dir] %>/<%= @app_name %>.access.log json;
|
||||
|
||||
Submodule site-cookbooks/openresty updated: bc916b981c...b31d6b0b01
@@ -8,7 +8,7 @@ upstream _rs_discourse {
|
||||
server {
|
||||
server_name <%= @server_name %>;
|
||||
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
Reference in New Issue
Block a user