Adding ability to disable/enable multi-tenancy flags easily.

This commit is contained in:
mike12345567 2021-07-26 16:17:56 +01:00
parent a279e5e504
commit 219962cb8a
7 changed files with 1663 additions and 38 deletions

View File

@ -43,6 +43,8 @@
"test:e2e": "lerna run cy:test",
"test:e2e:ci": "lerna run cy:ci",
"build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -",
"build:docker:develop": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -"
"build:docker:develop": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
"multi:enable": "lerna run multi:enable",
"multi:disable": "lerna run multi:disable"
}
}

View File

@ -23,7 +23,9 @@
"format": "prettier --config ../../.prettierrc.json 'src/**/*.ts' --write",
"lint": "eslint --fix src/",
"lint:fix": "yarn run format && yarn run lint",
"initialise": "node scripts/initialise.js"
"initialise": "node scripts/initialise.js",
"multi:enable": "node scripts/multiTenancy.js enable",
"multi:disable": "node scripts/multiTenancy.js disable"
},
"jest": {
"preset": "ts-jest",
@ -135,7 +137,8 @@
"supertest": "^4.0.2",
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
"typescript": "^4.3.4",
"update-dotenv": "^1.1.1"
},
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
}

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,9 @@
"build:docker": "docker build . -t worker-service",
"dev:stack:init": "node ./scripts/dev/manage.js init",
"dev:builder": "npm run dev:stack:init && nodemon src/index.js",
"test": "jest --runInBand"
"test": "jest --runInBand",
"multi:enable": "node scripts/multiTenancy.js enable",
"multi:disable": "node scripts/multiTenancy.js disable"
},
"author": "Budibase",
"license": "AGPL-3.0-or-later",
@ -52,7 +54,8 @@
"jest": "^26.6.3",
"nodemon": "^2.0.7",
"pouchdb-adapter-memory": "^7.2.2",
"supertest": "^6.1.3"
"supertest": "^6.1.3",
"update-dotenv": "^1.1.1"
},
"jest": {
"testEnvironment": "node",

View File

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

File diff suppressed because it is too large Load Diff