Add self host enable/disable scripts

This commit is contained in:
Rory Powell 2021-09-14 12:21:16 +01:00
parent d2c5197fa0
commit 62e93d2302
5 changed files with 24 additions and 2 deletions

View File

@ -47,6 +47,8 @@
"release:helm": "./scripts/release_helm_chart.sh",
"multi:enable": "lerna run multi:enable",
"multi:disable": "lerna run multi:disable",
"selfhost:enable": "lerna run selfhost:enable",
"selfhost:disable": "lerna run selfhost:disable",
"postinstall": "husky install"
}
}

View File

@ -24,7 +24,9 @@
"lint": "eslint --fix src/",
"lint:fix": "yarn run format && yarn run lint",
"multi:enable": "node scripts/multiTenancy.js enable",
"multi:disable": "node scripts/multiTenancy.js disable"
"multi:disable": "node scripts/multiTenancy.js disable",
"self:enable": "node scripts/selfhost.js enable",
"self:disable": "node scripts/selfhost.js disable"
},
"jest": {
"preset": "ts-jest",

View File

@ -0,0 +1,8 @@
#!/usr/bin/env node
const updateDotEnv = require("update-dotenv")
const arg = process.argv.slice(2)[0]
updateDotEnv({
SELF_HOSTED: arg === "enable" ? "1" : "0",
}).then(() => console.log("Updated server!"))

View File

@ -18,7 +18,9 @@
"dev:builder": "npm run dev:stack:init && nodemon src/index.js",
"test": "jest --runInBand",
"multi:enable": "node scripts/multiTenancy.js enable",
"multi:disable": "node scripts/multiTenancy.js disable"
"multi:disable": "node scripts/multiTenancy.js disable",
"selfhost:enable": "node scripts/selfhost.js enable",
"selfhost:disable": "node scripts/selfhost.js disable"
},
"author": "Budibase",
"license": "AGPL-3.0-or-later",

View File

@ -0,0 +1,8 @@
#!/usr/bin/env node
const updateDotEnv = require("update-dotenv")
const arg = process.argv.slice(2)[0]
updateDotEnv({
SELF_HOSTED: arg === "enable" ? "1" : "0",
}).then(() => console.log("Updated worker!"))