From d6328ab764c3626aef99727b873003384951d299 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Wed, 22 Apr 2026 06:39:22 -0500 Subject: [PATCH] fix(gp): weird issue with db username and password --- backend/configs/gpSql.config.ts | 8 +++----- backend/gpSql/gpSqlConnection.controller.ts | 3 ++- docker-compose.yml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/configs/gpSql.config.ts b/backend/configs/gpSql.config.ts index 886e4fd..17e7a57 100644 --- a/backend/configs/gpSql.config.ts +++ b/backend/configs/gpSql.config.ts @@ -1,16 +1,14 @@ import type sql from "mssql"; -const username = process.env.GP_USER ?? "gpviewer"; -const password = process.env.GP_PASSWORD ?? "gp$$ViewOnly!"; - -const gpServer = process.env.GP_SERVER ?? "USMCD1VMS011"; +const username = "gpviewer"; +const password = "gp$$ViewOnly!"; const port = process.env.SQL_PORT ? Number.parseInt(process.env.SQL_PORT, 10) : undefined; export const gpSqlConfig: sql.config = { - server: gpServer, + server: `${process.env.GP_SERVER ?? "USMCD1VMS011"}`, port: port, database: `ALPLA`, user: username, diff --git a/backend/gpSql/gpSqlConnection.controller.ts b/backend/gpSql/gpSqlConnection.controller.ts index 2396d6b..7f34d45 100644 --- a/backend/gpSql/gpSqlConnection.controller.ts +++ b/backend/gpSql/gpSqlConnection.controller.ts @@ -53,13 +53,14 @@ export const connectGPSql = async () => { notify: false, }); } catch (error) { + console.log(error); reconnectToSql; return returnFunc({ success: false, level: "error", module: "system", subModule: "db", - message: "Failed to connect to the prod sql server.", + message: "Failed to connect to the gp sql server.", data: [error], notify: false, }); diff --git a/docker-compose.yml b/docker-compose.yml index 5fbee7e..9138fdd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: - PROD_USER=${PROD_USER} - PROD_PASSWORD=${PROD_PASSWORD} - GP_SERVER=10.193.9.31 - - SQL_PORT= 1433 + - SQL_PORT=1433 - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} - BETTER_AUTH_URL=${URL} - OPENDOCK_URL=${OPENDOCK_URL}