Files
lst_v3/backend/configs/prodSql.config.ts
Blake Matthes a6d53f0266
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m42s
refactor(sql): changed sql connection to ip:port
this change was needed for when we run in docker so we can connect to the servers
2026-04-22 05:40:38 -05:00

26 lines
866 B
TypeScript

import type sql from "mssql";
const port = process.env.SQL_PORT
? Number.parseInt(process.env.SQL_PORT, 10)
: undefined;
export const prodSqlConfig: sql.config = {
server: `${process.env.PROD_SERVER}`,
database: `AlplaPROD_${process.env.PROD_PLANT_TOKEN}_cus`,
port: port,
user: process.env.PROD_USER,
password: process.env.PROD_PASSWORD,
options: {
encrypt: true,
trustServerCertificate: true,
},
requestTimeout: 90000, // how long until we kill the query and fail it
pool: {
max: 20, // Maximum number of connections in the pool
min: 0, // Minimum number of connections in the pool
idleTimeoutMillis: 10000, // How long a connection is allowed to be idle before being released
reapIntervalMillis: 1000, // how often to check for idle resources to destroy
acquireTimeoutMillis: 100000, // How long until a complete timeout happens
},
};