90847e422d
* Feat: configurable file limits * ci(circleci): container build speed imporvements * feat(frontend nginx): add file size limit configurability to frontend nginx * feat(server blobstorage): use the new file size limit customization value * feat(helm chart): implement the file size configuration in the helm chart * fix(frontend docker): fix entrypoint script * fix(server blobstorage): fix env var parsing NaN * feat(fileimport-service): add customizable import timeout * feat(helm chart): add fileimport service timeout value to helm chart * feat(blobstorage): add server side blob storage size limits * feat(docker-compose): add blob size limit env var to docker-compose files * refactor(frontend file uploads): refactor file uploads to use `useQuery` * refactor(server env helper): move env helper to shared module * refactor(blobstorage): use env helper for file size limit * refactor(frontend file uploads): use generated query document * fix(server blob sotrage): fix file size limit function call Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
/* istanbul ignore file */
|
|
/**
|
|
* Bootstrap module that should be imported at the very top of each entry point module
|
|
*/
|
|
|
|
// Initializing module aliases for absolute import paths
|
|
require('module-alias')({ base: __dirname })
|
|
const appRoot = __dirname
|
|
|
|
// Initializing env vars
|
|
const dotenv = require('dotenv')
|
|
const {
|
|
isTestEnv,
|
|
isApolloMonitoringEnabled,
|
|
getApolloServerVersion,
|
|
getServerVersion
|
|
} = require('./modules/shared/helpers/envHelper')
|
|
|
|
if (isApolloMonitoringEnabled() && !getApolloServerVersion()) {
|
|
process.env.APOLLO_SERVER_USER_VERSION = getServerVersion()
|
|
}
|
|
|
|
// If running in test env, load .env.test first
|
|
// (appRoot necessary, cause env files aren't loaded through require() calls)
|
|
if (isTestEnv()) {
|
|
const { error } = dotenv.config({ path: `${appRoot}/.env.test` })
|
|
if (error) {
|
|
const e = new Error(
|
|
'Attempting to run tests without an .env.test file properly set up! Check readme!'
|
|
)
|
|
console.error(e)
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
dotenv.config({ path: `${appRoot}/.env` })
|
|
|
|
module.exports = {
|
|
appRoot
|
|
}
|