Merge branch 'develop' into BUDI-7393-view-permissions-behind-feature-flag

This commit is contained in:
Adria Navarro 2023-08-22 11:49:07 +03:00 committed by GitHub
commit 561fe3cbe9
4 changed files with 29 additions and 23 deletions

View File

@ -1,9 +1,26 @@
module.exports = () => {
return {
dockerCompose: {
composeFilePath: "../../hosting",
composeFile: "docker-compose.test.yaml",
startupTimeout: 10000,
},
couchdb: {
image: "budibase/couchdb",
ports: [5984],
env: {
COUCHDB_PASSWORD: "budibase",
COUCHDB_USER: "budibase",
},
wait: {
type: "ports",
timeout: 10000,
}
}
}
}
// module.exports = () => {
// return {
// dockerCompose: {
// composeFilePath: "../../hosting",
// composeFile: "docker-compose.test.yaml",
// startupTimeout: 10000,
// },
// }
// }

View File

@ -1,5 +1,5 @@
{
"version": "2.9.30-alpha.8",
"version": "2.9.30-alpha.9",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -32,8 +32,8 @@ function getTestContainerSettings(
): string | null {
const entry = Object.entries(global).find(
([k]) =>
k.includes(`_${serverName.toUpperCase()}`) &&
k.includes(`_${key.toUpperCase()}__`)
k.includes(`${serverName.toUpperCase()}`) &&
k.includes(`${key.toUpperCase()}`)
)
if (!entry) {
return null
@ -67,27 +67,14 @@ function getContainerInfo(containerName: string, port: number) {
}
function getCouchConfig() {
return getContainerInfo("couchdb-service", 5984)
}
function getMinioConfig() {
return getContainerInfo("minio-service", 9000)
}
function getRedisConfig() {
return getContainerInfo("redis-service", 6379)
return getContainerInfo("couchdb", 5984)
}
export function setupEnv(...envs: any[]) {
const couch = getCouchConfig(),
minio = getMinioConfig(),
redis = getRedisConfig()
const couch = getCouchConfig()
const configs = [
{ key: "COUCH_DB_PORT", value: couch.port },
{ key: "COUCH_DB_URL", value: couch.url },
{ key: "MINIO_PORT", value: minio.port },
{ key: "MINIO_URL", value: minio.url },
{ key: "REDIS_URL", value: redis.url },
]
for (const config of configs.filter(x => !!x.value)) {

View File

@ -20,11 +20,13 @@ import { startup } from "./startup"
let app: Koa, server: Server
async function start() {
// if API disabled, could run automations instead
if (apiEnabled()) {
const koa = createKoaApp()
app = koa.app
server = koa.server
}
// startup includes automation runner - if enabled
await startup(app, server)
if (env.isProd()) {
env._set("NODE_ENV", "production")