From fb7e6c7e8e14eab7b8383d551172b0ba0da1e7f5 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 5 May 2017 22:00:05 -0500 Subject: [PATCH] backups: default to s3 backup for production. --- config/danbooru_default_config.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 775ceb9a0..904152d77 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -90,8 +90,18 @@ module Danbooru true end + # What method to use to backup images. + # + # NullBackupService: Don't backup images at all. + # + # S3BackupService: Backup to Amazon S3. Must configure aws_access_key_id, + # aws_secret_access_key, and aws_s3_bucket_name. Bucket must exist and be writable. def backup_service - NullBackupService.new + if Rails.env.production? + S3BackupService.new + else + NullBackupService.new + end end # What method to use to store images.