overleaf/services/filestore/config/settings.defaults.coffee

53 lines
1.6 KiB
CoffeeScript
Raw Normal View History

2014-04-02 12:45:41 -04:00
Path = require "path"
2018-03-23 11:26:38 -04:00
settings =
2014-02-14 11:39:05 -05:00
internal:
filestore:
port: 3009
host: "localhost"
filestore:
2014-04-02 12:45:41 -04:00
# Which backend persistor to use.
# Choices are
# s3 - Amazon S3
# fs - local filesystem
2018-03-23 11:26:38 -04:00
if process.env['AWS_KEY']?
backend: "s3"
s3:
key: process.env['AWS_KEY']
secret: process.env['AWS_SECRET']
stores:
user_files: process.env['AWS_S3_USER_FILES_BUCKET_NAME']
template_files: process.env['AWS_S3_TEMPLATE_FILES_BUCKET_NAME']
public_files: process.env['AWS_S3_PUBLIC_FILES_BUCKET_NAME']
else
backend: "fs"
stores:
#
# For local filesystem this is the directory to store the files in.
# Must contain full path, e.g. "/var/lib/sharelatex/data".
# This path must exist, not be tmpfs and be writable to by the user sharelatex is run as.
user_files: Path.resolve(__dirname + "/../user_files")
public_files: Path.resolve(__dirname + "/../public_files")
template_files: Path.resolve(__dirname + "/../template_files")
2014-02-14 11:39:05 -05:00
2014-05-17 16:01:48 -04:00
path:
uploadFolder: Path.resolve(__dirname + "/../uploads")
commands:
# Any commands to wrap the convert utility in, for example ["nice"], or ["firejail", "--profile=/etc/firejail/convert.profile"]
convertCommandPrefix: []
2014-05-17 16:01:48 -04:00
2018-03-23 11:26:38 -04:00
# Filestore health check
# ----------------------
# Project and file details to check in persistor when calling /health_check
if process.env['HEALTH_CHECK_PROJECT_ID']? and process.env['HEALTH_CHECK_FILE_ID']?
settings.health_check =
project_id: process.env['HEALTH_CHECK_PROJECT_ID']
file_id: process.env['HEALTH_CHECK_FILE_ID']
module.exports = settings
console.log module.exports