Merge pull request #3726 from Matt-Yorkley/db2fog_patch

Db2fog patch
This commit is contained in:
Pau Pérez Fabregat
2019-04-12 14:26:46 +02:00
committed by GitHub
3 changed files with 10 additions and 3 deletions

View File

@@ -2,6 +2,6 @@
DB2Fog.config = {
:aws_access_key_id => Spree::Config[:s3_access_key],
:aws_secret_access_key => Spree::Config[:s3_secret],
:directory => Spree::Config[:s3_bucket],
:directory => ENV['S3_BACKUPS_BUCKET'],
:provider => 'AWS'
}

View File

@@ -20,6 +20,13 @@ Spree.config do |config|
# Auto-capture payments. Without this option, payments must be manually captured in the paypal interface.
config.auto_capture = true
#config.override_actionmailer_config = false
# S3 settings
config.s3_bucket = ENV['S3_BUCKET'] if ENV['S3_BUCKET']
config.s3_access_key = ENV['S3_ACCESS_KEY'] if ENV['S3_ACCESS_KEY']
config.s3_secret = ENV['S3_SECRET'] if ENV['S3_SECRET']
config.use_s3 = true if ENV['S3_ACCESS_KEY'] && ENV['S3_SECRET']
config.s3_protocol = ENV.fetch('S3_PROTOCOL', 'https')
end
# Don't log users out when setting a new password

View File

@@ -21,11 +21,11 @@ every 1.day, at: '12:05am' do
end
every 1.day, at: '2:45am' do
rake 'db2fog:clean'
rake 'db2fog:clean' if ENV['S3_BACKUPS_BUCKET']
end
every 4.hours do
rake 'db2fog:backup'
rake 'db2fog:backup' if ENV['S3_BACKUPS_BUCKET']
end
every 5.minutes do