From 3e1ef3af635bad5d9e40352426a4257b3aa2c4d5 Mon Sep 17 00:00:00 2001 From: Michael Mazour Date: Fri, 6 Jul 2018 11:05:19 +0100 Subject: [PATCH] Populate S3 settings from environment variable --- services/filestore/config/settings.defaults.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/filestore/config/settings.defaults.coffee b/services/filestore/config/settings.defaults.coffee index ef44bbb604..62d42cf9e3 100644 --- a/services/filestore/config/settings.defaults.coffee +++ b/services/filestore/config/settings.defaults.coffee @@ -23,7 +23,8 @@ module.exports = user_files: Path.resolve(__dirname + "/../user_files") public_files: Path.resolve(__dirname + "/../public_files") template_files: Path.resolve(__dirname + "/../template_files") - # if you are using S3, then fill in your S3 details below + # if you are using S3, then fill in your S3 details below, + # or use env var with the same structure. # s3: # key: "" # default # secret: "" # default @@ -31,6 +32,7 @@ module.exports = # auth_key: "" # auth_secret: "" # bucketname2: # secrets for bucketname2... + s3: JSON.parse process.env['S3_CREDENTIALS'] if process.env['S3_CREDENTIALS'] path: uploadFolder: Path.resolve(__dirname + "/../uploads")