mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
unblock gamma pipeline
This commit is contained in:
@@ -97,14 +97,17 @@ import { githubPushEventSecretScan } from "./queues/secret-scanning/githubScanPu
|
||||
const SmeeClient = require("smee-client"); // eslint-disable-line
|
||||
import path from "path";
|
||||
import { serverConfigInit } from "./config/serverConfig";
|
||||
import { initRedis } from "./services/RedisService";
|
||||
|
||||
let handler: null | any = null;
|
||||
|
||||
const main = async () => {
|
||||
await initLogger();
|
||||
|
||||
const port = await getPort();
|
||||
|
||||
// initializing the database connection
|
||||
// initializing the database connection + redis
|
||||
await initRedis()
|
||||
await DatabaseService.initDatabase(await getMongoURL());
|
||||
const serverCfg = await serverConfigInit();
|
||||
await setup();
|
||||
|
||||
@@ -3,11 +3,14 @@ import { logger } from "../utils/logging";
|
||||
|
||||
let redisClient: TRedis | null;
|
||||
|
||||
if (process.env.REDIS_URL) {
|
||||
redisClient = new Redis(process.env.REDIS_URL as string);
|
||||
} else {
|
||||
logger.warn("Redis URL not set, skipping Redis initialization.");
|
||||
redisClient = null;
|
||||
export const initRedis = async () => {
|
||||
if (process.env.REDIS_URL) {
|
||||
redisClient = new Redis(process.env.REDIS_URL as string);
|
||||
} else {
|
||||
logger.warn("Redis URL not set, skipping Redis initialization.");
|
||||
redisClient = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export { redisClient };
|
||||
|
||||
@@ -19,7 +19,7 @@ export const initLogger = async () => {
|
||||
const isProduction = nodeEnv === "production";
|
||||
const targets: pino.TransportMultiOptions["targets"][number][] = [
|
||||
isProduction
|
||||
? { level: "info", target: "pino/file", options: { destination: 'logs/infisical-backend/logs.txt', mkdir: true } }
|
||||
? { level: "info", target: "pino/file", options: {} }
|
||||
: {
|
||||
level: "info",
|
||||
target: "pino-pretty", // must be installed separately
|
||||
|
||||
Reference in New Issue
Block a user