Fix missing dir for Mastodon maintenance file

This commit is contained in:
Râu Cao 2025-04-29 17:53:05 +04:00
parent cab766c806
commit f8e5fd2f3e
Signed by: raucao
GPG Key ID: 37036C356E56CC51
2 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,13 @@ search(:node, "role:mastodon").each do |node|
end end
if upstream_hosts.any? if upstream_hosts.any?
web_root_dir = "/var/www/#{server_name}/public" web_root_dir = "/var/www/#{server_name}/public"
directory web_root_dir do
action :create
recursive true
owner 'www-data'
group 'www-data'
mode 0755
end
else else
web_root_dir = "#{app_dir}/public" web_root_dir = "#{app_dir}/public"
upstream_hosts << "localhost" upstream_hosts << "localhost"

View File

@ -59,7 +59,7 @@ cookbook_file "#{node["nginx"]["user_home"]}/maintenance.html" do
source "maintenance.html" source "maintenance.html"
owner node['nginx']['user'] owner node['nginx']['user']
group node['nginx']['group'] group node['nginx']['group']
mode "0640" mode "0755"
end end
unless node.chef_environment == "development" unless node.chef_environment == "development"