|
|
@ -438,12 +438,7 @@ namespace :mastodon do
|
|
|
|
"#{key}=#{escaped}"
|
|
|
|
"#{key}=#{escaped}"
|
|
|
|
end.join("\n")
|
|
|
|
end.join("\n")
|
|
|
|
|
|
|
|
|
|
|
|
generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n".dup
|
|
|
|
generated_header = generate_header(incompatible_syntax)
|
|
|
|
|
|
|
|
|
|
|
|
if incompatible_syntax
|
|
|
|
|
|
|
|
generated_header << "# Some variables in this file will be interpreted differently whether you are\n"
|
|
|
|
|
|
|
|
generated_header << "# using docker-compose or not.\n\n"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rails.root.join('.env.production').write("#{generated_header}#{env_contents}\n")
|
|
|
|
Rails.root.join('.env.production').write("#{generated_header}#{env_contents}\n")
|
|
|
|
|
|
|
|
|
|
|
@ -538,6 +533,19 @@ namespace :mastodon do
|
|
|
|
puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}"
|
|
|
|
puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def generate_header(include_warning)
|
|
|
|
|
|
|
|
default_message = "# Generated with mastodon:setup on #{Time.now.utc}\n\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default_message.tap do |string|
|
|
|
|
|
|
|
|
if include_warning
|
|
|
|
|
|
|
|
string << "# Some variables in this file will be interpreted differently whether you are\n"
|
|
|
|
|
|
|
|
string << "# using docker-compose or not.\n\n"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def disable_log_stdout!
|
|
|
|
def disable_log_stdout!
|
|
|
|