From 45a450952538f238cea7d4bb6396af68bd88d0ae Mon Sep 17 00:00:00 2001 From: subnub Date: Sun, 8 Mar 2020 13:48:48 -0400 Subject: [PATCH] Added check to getKey, checks if key was added through env variable, if it is, it skips prompting for the password. This should make it so creating docker images is easier --- .DS_Store | Bin 6148 -> 6148 bytes key/getKey.js | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index be3456bf3f7df1b4083397b29c8761f9fbfbfbac..454ab206e7178af466cf01676c1ed2a0c9cfc7ef 100644 GIT binary patch delta 21 ccmZoMXffEZnuWu}+*C)w(A0SIW|lx<07!8LBLDyZ delta 21 ccmZoMXffEZnuWu{z)VNM$kJ@{W|lx<07#MsDF6Tf diff --git a/key/getKey.js b/key/getKey.js index e9e3a38..ec8f25d 100644 --- a/key/getKey.js +++ b/key/getKey.js @@ -4,7 +4,12 @@ const crypto = require("crypto"); const getKey = async() => { - if (process.env.NODE_ENV) { + if (process.env.KEY) { + // For Docker + + env.key = process.env.KEY + + } else if (process.env.NODE_ENV) { let password = await prompt("Enter Server Encryption Password: ", {method: "hide"});