diff options
author | Reverite <github@reverite.sh> | 2019-09-30 16:38:09 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-09-30 16:38:09 -0700 |
commit | 01001ba118d7adcd4966c893cf95db32fe76c273 (patch) | |
tree | fc8b580c8f0a3c1e14a8ca20e3bea5bd7acb4ff1 /lib/tasks/mastodon.rake | |
parent | 1e75b3d874973dd71ea74b158ebeb501d9ac68a3 (diff) | |
parent | 65db9df011a3e13efa79f4e56343aa69bdad7716 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'lib/tasks/mastodon.rake')
-rw-r--r-- | lib/tasks/mastodon.rake | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index ee9657b0e..2e92e8ded 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -135,7 +135,7 @@ 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']) + case prompt.select('Provider', ['Amazon S3', 'Wasabi', 'Minio', 'Google Cloud Storage']) when 'Amazon S3' env['S3_ENABLED'] = 'true' env['S3_PROTOCOL'] = 'https' @@ -217,6 +217,34 @@ namespace :mastodon do q.required true q.modify :strip end + when 'Google Cloud Storage' + env['S3_ENABLED'] = 'true' + env['S3_PROTOCOL'] = 'https' + env['S3_HOSTNAME'] = 'storage.googleapis.com' + env['S3_ENDPOINT'] = 'https://storage.googleapis.com' + env['S3_MULTIPART_THRESHOLD'] = 50.megabytes + + env['S3_BUCKET'] = prompt.ask('GCS bucket name:') do |q| + q.required true + q.default "files.#{env['LOCAL_DOMAIN']}" + q.modify :strip + end + + env['S3_REGION'] = prompt.ask('GCS region:') do |q| + q.required true + q.default 'us-west1' + q.modify :strip + end + + env['AWS_ACCESS_KEY_ID'] = prompt.ask('GCS access key:') do |q| + q.required true + q.modify :strip + end + + env['AWS_SECRET_ACCESS_KEY'] = prompt.ask('GCS secret key:') do |q| + q.required true + q.modify :strip + end end if prompt.yes?('Do you want to access the uploaded files from your own domain?') |