1
0
Fork 0
mirror of synced 2024-09-11 23:16:00 +12:00

Merge pull request #7739 from Budibase/fix/build-fix

Fix test case and port issue for AAS build
This commit is contained in:
Michael Drury 2022-09-12 16:37:49 +02:00 committed by GitHub
commit 36da72f609
3 changed files with 13 additions and 4 deletions

View file

@ -37,8 +37,8 @@ function parseIntSafe(number) {
let inThread = false let inThread = false
module.exports = { module.exports = {
// important // important - prefer app port to generic port
PORT: process.env.PORT || process.env.APP_PORT, PORT: process.env.APP_PORT || process.env.PORT,
JWT_SECRET: process.env.JWT_SECRET, JWT_SECRET: process.env.JWT_SECRET,
COUCH_DB_URL: process.env.COUCH_DB_URL, COUCH_DB_URL: process.env.COUCH_DB_URL,
MINIO_URL: process.env.MINIO_URL, MINIO_URL: process.env.MINIO_URL,

View file

@ -44,7 +44,15 @@ const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules")
exports.init = () => { exports.init = () => {
const tempDir = budibaseTempDir() const tempDir = budibaseTempDir()
if (!fs.existsSync(tempDir)) { if (!fs.existsSync(tempDir)) {
fs.mkdirSync(tempDir) // some test cases fire this quickly enough that
// synchronous cases can end up here at the same time
try {
fs.mkdirSync(tempDir)
} catch (err) {
if (!err || err.code !== "EEXIST") {
throw err
}
}
} }
const clientLibPath = join(budibaseTempDir(), "budibase-client.js") const clientLibPath = join(budibaseTempDir(), "budibase-client.js")
if (env.isTest() && !fs.existsSync(clientLibPath)) { if (env.isTest() && !fs.existsSync(clientLibPath)) {

View file

@ -43,7 +43,8 @@ const env = {
PLATFORM_URL: process.env.PLATFORM_URL, PLATFORM_URL: process.env.PLATFORM_URL,
APPS_URL: process.env.APPS_URL, APPS_URL: process.env.APPS_URL,
// ports // ports
PORT: process.env.PORT || process.env.WORKER_PORT, // prefer worker port to generic port
PORT: process.env.WORKER_PORT || process.env.PORT,
CLUSTER_PORT: process.env.CLUSTER_PORT, CLUSTER_PORT: process.env.CLUSTER_PORT,
// flags // flags
NODE_ENV: process.env.NODE_ENV, NODE_ENV: process.env.NODE_ENV,