diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-14 10:31:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 10:31:28 +0100 |
commit | 72335694744da87cbfaff20992cb36817f6f8a60 (patch) | |
tree | 55c1b799be04cf83f425414dce762bf9403e2b85 /lib/tasks | |
parent | 81b1d32d5b618daa4003b8de8292ae4dd3e656f6 (diff) | |
parent | c31e756644120cab650452e9d1c00a1e2f26ade4 (diff) |
Merge pull request #1923 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/mastodon.rake | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 3ec685c74..c1e5bd2b4 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -142,7 +142,40 @@ namespace :mastodon do prompt.say "\n" if prompt.yes?('Do you want to store uploaded files on the cloud?', default: false) - case prompt.select('Provider', ['Amazon S3', 'Wasabi', 'Minio', 'Google Cloud Storage']) + case prompt.select('Provider', ['DigitalOcean Spaces', 'Amazon S3', 'Wasabi', 'Minio', 'Google Cloud Storage']) + when 'DigitalOcean Spaces' + env['S3_ENABLED'] = 'true' + env['S3_PROTOCOL'] = 'https' + + env['S3_BUCKET'] = prompt.ask('Space name:') do |q| + q.required true + q.default "files.#{env['LOCAL_DOMAIN']}" + q.modify :strip + end + + env['S3_REGION'] = prompt.ask('Space region:') do |q| + q.required true + q.default 'nyc3' + q.modify :strip + end + + env['S3_HOSTNAME'] = prompt.ask('Space endpoint:') do |q| + q.required true + q.default 'nyc3.digitaloceanspaces.com' + q.modify :strip + end + + env['S3_ENDPOINT'] = "https://#{env['S3_HOSTNAME']}" + + env['AWS_ACCESS_KEY_ID'] = prompt.ask('Space access key:') do |q| + q.required true + q.modify :strip + end + + env['AWS_SECRET_ACCESS_KEY'] = prompt.ask('Space secret key:') do |q| + q.required true + q.modify :strip + end when 'Amazon S3' env['S3_ENABLED'] = 'true' env['S3_PROTOCOL'] = 'https' |