Merge remote-tracking branch 'parent/main' into upstream-20240123
This commit is contained in:
commit
50ae2d9439
320 changed files with 2587 additions and 2817 deletions
|
@ -96,7 +96,7 @@ module Mastodon
|
|||
|
||||
def api_versions
|
||||
{
|
||||
mastodon: 2,
|
||||
mastodon: 3,
|
||||
kmyblue: KMYBLUE_API_VERSION,
|
||||
}
|
||||
end
|
||||
|
|
|
@ -52,8 +52,8 @@ module Paperclip
|
|||
@output_options['bufsize'] = bitrate * 5
|
||||
|
||||
if high_vfr?(metadata)
|
||||
# TODO: change to `fps_mode` in the future, as `vsync` is being deprecated
|
||||
@output_options['vsync'] = 'vfr'
|
||||
@output_options['r'] = @vfr_threshold
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,16 +11,35 @@ namespace :db do
|
|||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY
|
||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT
|
||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY
|
||||
).any? { |key| ENV.key?(key) }
|
||||
).any? { |key| ENV[key].present? }
|
||||
unless ENV['IGNORE_ALREADY_SET_SECRETS'] == 'true'
|
||||
puts <<~MSG
|
||||
Secrets for this server have already been set, this step can likely be ignored!
|
||||
In the unlikely event you need to generate new secrets, re-run this command with `IGNORE_ALREADY_SET_SECRETS=true`.
|
||||
MSG
|
||||
|
||||
next
|
||||
end
|
||||
|
||||
pastel = Pastel.new
|
||||
puts pastel.red(<<~MSG)
|
||||
WARNING: It looks like encryption secrets have already been set. Please ensure you are not changing secrets for a Mastodon installation that already uses them, as this will cause data loss and other issues that are difficult to recover from.
|
||||
WARNING: It looks like encryption secrets have already been set.
|
||||
WARNING: Ensure you are not changing secrets for a Mastodon installation that already uses them, as this will cause data loss and other issues that are difficult to recover from.
|
||||
WARNING: Only proceed if you are absolutely sure of what you are doing!
|
||||
MSG
|
||||
|
||||
puts <<~MSG
|
||||
If you are sure of what you are doing, add the following secret environment variables to your Mastodon environment (e.g. .env.production), ensure they are shared across all your nodes and do not change them after they are set:#{' '}
|
||||
MSG
|
||||
else
|
||||
puts <<~MSG
|
||||
Add the following secret environment variables to your Mastodon environment (e.g. .env.production), ensure they are shared across all your nodes and do not change them after they are set:#{' '}
|
||||
MSG
|
||||
end
|
||||
|
||||
puts <<~MSG
|
||||
Add the following secret environment variables to your Mastodon environment (e.g. .env.production), ensure they are shared across all your nodes and do not change them after they are set:#{' '}
|
||||
|
||||
# Do NOT change these variables once they are set
|
||||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=#{SecureRandom.alphanumeric(32)}
|
||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=#{SecureRandom.alphanumeric(32)}
|
||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=#{SecureRandom.alphanumeric(32)}
|
||||
|
|
|
@ -8,6 +8,12 @@ namespace :mastodon do
|
|||
prompt = TTY::Prompt.new
|
||||
env = {}
|
||||
|
||||
if ENV['LOCAL_DOMAIN']
|
||||
prompt.warn "It looks like you already configured Mastodon for domain '#{ENV['LOCAL_DOMAIN']}'."
|
||||
prompt.warn 'Never re-run this task on an already-configured running server.'
|
||||
next prompt.warn 'Nothing saved. Bye!' if prompt.no?('Continue anyway?')
|
||||
end
|
||||
|
||||
clear_environment!
|
||||
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue