mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user