mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 12:03:33 -05:00
Merge pull request #124 from overleaf/spd-persistor-config
Move config settings to correct place for new persistor module
This commit is contained in:
commit
dc0967b01b
2 changed files with 3 additions and 4 deletions
|
@ -43,6 +43,7 @@ settings =
|
|||
unlockBeforeDelete: process.env['GCS_UNLOCK_BEFORE_DELETE'] == "true" # unlock an event-based hold before deleting. default false
|
||||
deletedBucketSuffix: process.env['GCS_DELETED_BUCKET_SUFFIX'] # if present, copy file to another bucket on delete. default null
|
||||
deleteConcurrency: parseInt(process.env['GCS_DELETE_CONCURRENCY']) || 50
|
||||
signedUrlExpiryInMs: parseInt(process.env['LINK_EXPIRY_TIMEOUT'] || 60000)
|
||||
|
||||
s3:
|
||||
if process.env['AWS_ACCESS_KEY_ID']? or process.env['S3_BUCKET_CREDENTIALS']?
|
||||
|
@ -51,6 +52,7 @@ settings =
|
|||
endpoint: process.env['AWS_S3_ENDPOINT']
|
||||
pathStyle: process.env['AWS_S3_PATH_STYLE']
|
||||
partSize: process.env['AWS_S3_PARTSIZE'] or (100 * 1024 * 1024)
|
||||
bucketCreds: JSON.parse process.env['S3_BUCKET_CREDENTIALS'] if process.env['S3_BUCKET_CREDENTIALS']?
|
||||
|
||||
# GCS should be configured by the service account on the kubernetes pod. See GOOGLE_APPLICATION_CREDENTIALS,
|
||||
# which will be picked up automatically.
|
||||
|
@ -60,8 +62,6 @@ settings =
|
|||
template_files: process.env['TEMPLATE_FILES_BUCKET_NAME']
|
||||
public_files: process.env['PUBLIC_FILES_BUCKET_NAME']
|
||||
|
||||
s3BucketCreds: JSON.parse process.env['S3_BUCKET_CREDENTIALS'] if process.env['S3_BUCKET_CREDENTIALS']?
|
||||
|
||||
fallback:
|
||||
if process.env['FALLBACK_BACKEND']?
|
||||
backend: process.env['FALLBACK_BACKEND']
|
||||
|
@ -71,7 +71,6 @@ settings =
|
|||
copyOnMiss: process.env['COPY_ON_MISS'] == 'true'
|
||||
|
||||
allowRedirects: if process.env['ALLOW_REDIRECTS'] == 'true' then true else false
|
||||
signedUrlExpiryInMs: parseInt(process.env['LINK_EXPIRY_TIMEOUT'] || 60000)
|
||||
|
||||
path:
|
||||
uploadFolder: Path.resolve(__dirname + "/../uploads")
|
||||
|
|
|
@ -15,7 +15,7 @@ describe('Settings', function() {
|
|||
const settings = SandboxedModule.require('settings-sharelatex', {
|
||||
globals: { console, process }
|
||||
})
|
||||
expect(settings.filestore.s3BucketCreds).to.deep.equal(s3Settings)
|
||||
expect(settings.filestore.s3.bucketCreds).to.deep.equal(s3Settings)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue