Default plugins dir to /plugins

This commit is contained in:
Andrew Kingston 2022-08-16 15:16:46 +00:00
parent 55eef09204
commit 623a5ee563
2 changed files with 7 additions and 2 deletions

View File

@ -138,7 +138,12 @@ module.exports = server.listen(env.PORT || 0, async () => {
} }
// monitor plugin directory if required // monitor plugin directory if required
if (env.SELF_HOSTED && !env.MULTI_TENANCY && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { if (
env.SELF_HOSTED &&
!env.MULTI_TENANCY &&
env.PLUGINS_DIR &&
fs.existsSync(env.PLUGINS_DIR)
) {
const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz")
chokidar chokidar
.watch(watchPath, { .watch(watchPath, {

View File

@ -77,7 +77,7 @@ module.exports = {
SQL_MAX_ROWS: process.env.SQL_MAX_ROWS, SQL_MAX_ROWS: process.env.SQL_MAX_ROWS,
BB_ADMIN_USER_EMAIL: process.env.BB_ADMIN_USER_EMAIL, BB_ADMIN_USER_EMAIL: process.env.BB_ADMIN_USER_EMAIL,
BB_ADMIN_USER_PASSWORD: process.env.BB_ADMIN_USER_PASSWORD, BB_ADMIN_USER_PASSWORD: process.env.BB_ADMIN_USER_PASSWORD,
PLUGINS_DIR: process.env.PLUGINS_DIR, PLUGINS_DIR: process.env.PLUGINS_DIR || "/plugins",
// flags // flags
ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS,
DISABLE_THREADING: process.env.DISABLE_THREADING, DISABLE_THREADING: process.env.DISABLE_THREADING,