Fix an undefined variable on older Ubuntu versions
This commit is contained in:
parent
b3786053a5
commit
39744f517f
|
@ -23,6 +23,8 @@ unless platform?('ubuntu') && node[:platform_version].to_f < 18.04
|
||||||
owner 'mastodon'
|
owner 'mastodon'
|
||||||
action :create
|
action :create
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
postgresql_data_bag_item = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
mastodon_path = node["kosmos-mastodon"]["directory"]
|
mastodon_path = node["kosmos-mastodon"]["directory"]
|
||||||
|
@ -88,6 +90,8 @@ template "/lib/systemd/system/mastodon-streaming.service" do
|
||||||
notifies :restart, "service[mastodon-streaming]", :delayed
|
notifies :restart, "service[mastodon-streaming]", :delayed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
user = "mastodon"
|
||||||
|
|
||||||
application mastodon_path do
|
application mastodon_path do
|
||||||
owner "mastodon"
|
owner "mastodon"
|
||||||
group "mastodon"
|
group "mastodon"
|
||||||
|
@ -100,8 +104,8 @@ application mastodon_path do
|
||||||
end
|
end
|
||||||
|
|
||||||
git do
|
git do
|
||||||
user "mastodon"
|
user user
|
||||||
group "mastodon"
|
group user
|
||||||
repository "https://gitea.kosmos.org/kosmos/mastodon.git"
|
repository "https://gitea.kosmos.org/kosmos/mastodon.git"
|
||||||
revision "production"
|
revision "production"
|
||||||
end
|
end
|
||||||
|
@ -111,8 +115,8 @@ application mastodon_path do
|
||||||
template ".env.production" do
|
template ".env.production" do
|
||||||
source "env.production.erb"
|
source "env.production.erb"
|
||||||
mode "0640"
|
mode "0640"
|
||||||
owner "mastodon"
|
owner user
|
||||||
group "mastodon"
|
group user
|
||||||
variables redis_url: node["kosmos-mastodon"]["redis_url"],
|
variables redis_url: node["kosmos-mastodon"]["redis_url"],
|
||||||
domain: node["kosmos-mastodon"]["server_name"],
|
domain: node["kosmos-mastodon"]["server_name"],
|
||||||
paperclip_secret: mastodon_credentials['paperclip_secret'],
|
paperclip_secret: mastodon_credentials['paperclip_secret'],
|
||||||
|
@ -132,14 +136,14 @@ application mastodon_path do
|
||||||
|
|
||||||
execute do
|
execute do
|
||||||
environment "HOME" => mastodon_path
|
environment "HOME" => mastodon_path
|
||||||
user "mastodon"
|
user user
|
||||||
cwd mastodon_path
|
cwd mastodon_path
|
||||||
command "/opt/ruby_build/builds/#{ruby_version}/bin/bundle install --without development,test --deployment"
|
command "/opt/ruby_build/builds/#{ruby_version}/bin/bundle install --without development,test --deployment"
|
||||||
end
|
end
|
||||||
|
|
||||||
execute do
|
execute do
|
||||||
environment "HOME" => mastodon_path
|
environment "HOME" => mastodon_path
|
||||||
user "mastodon"
|
user user
|
||||||
cwd mastodon_path
|
cwd mastodon_path
|
||||||
command "yarn install --pure-lockfile"
|
command "yarn install --pure-lockfile"
|
||||||
end
|
end
|
||||||
|
@ -152,8 +156,8 @@ application mastodon_path do
|
||||||
|
|
||||||
execute 'rake db:migrate' do
|
execute 'rake db:migrate' do
|
||||||
environment "RAILS_ENV" => "production", "HOME" => mastodon_path
|
environment "RAILS_ENV" => "production", "HOME" => mastodon_path
|
||||||
user "mastodon"
|
user user
|
||||||
group "mastodon"
|
group user
|
||||||
cwd mastodon_path
|
cwd mastodon_path
|
||||||
command "PATH=\"/opt/ruby_build/builds/#{ruby_version}/bin:$PATH\" bundle exec rake db:migrate"
|
command "PATH=\"/opt/ruby_build/builds/#{ruby_version}/bin:$PATH\" bundle exec rake db:migrate"
|
||||||
end
|
end
|
||||||
|
@ -163,8 +167,8 @@ application mastodon_path do
|
||||||
# it cannot find the bundled gems
|
# it cannot find the bundled gems
|
||||||
execute 'rake assets:precompile' do
|
execute 'rake assets:precompile' do
|
||||||
environment "RAILS_ENV" => "production", "HOME" => mastodon_path
|
environment "RAILS_ENV" => "production", "HOME" => mastodon_path
|
||||||
user "mastodon"
|
user user
|
||||||
group "mastodon"
|
group user
|
||||||
cwd mastodon_path
|
cwd mastodon_path
|
||||||
command "PATH=\"/opt/ruby_build/builds/#{ruby_version}/bin:$PATH\" bundle exec rake assets:precompile"
|
command "PATH=\"/opt/ruby_build/builds/#{ruby_version}/bin:$PATH\" bundle exec rake assets:precompile"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue