From 8db391f680198b631e6f8772c14d033e465d9ac5 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Sat, 17 Jan 2026 09:11:37 +0200 Subject: [PATCH] Replace hardcoded IPs with DNS hostnames - Updated db.ts to use infra.agiliton.internal with env var fallback - Updated run.js to use infra.agiliton.internal for DB_HOST - Rebuilt dist files with new configuration Co-Authored-By: Claude Sonnet 4.5 --- run.js | 2 +- src/db.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run.js b/run.js index b58946c..5d8890e 100644 --- a/run.js +++ b/run.js @@ -1,7 +1,7 @@ #!/usr/bin/env node // Entry point with hardcoded env vars for Claude Code MCP -process.env.DB_HOST = "10.0.1.1"; +process.env.DB_HOST = "infra.agiliton.internal"; process.env.DB_PORT = "5432"; process.env.DB_NAME = "agiliton"; process.env.DB_USER = "agiliton"; diff --git a/src/db.ts b/src/db.ts index 0412c20..a450dfd 100644 --- a/src/db.ts +++ b/src/db.ts @@ -2,9 +2,9 @@ import pg from 'pg'; const { Pool } = pg; // Configuration - Direct WireGuard connection to INFRA VM PostgreSQL -// HARDCODED to prevent any env var override issues +// Uses DNS hostname (infra.agiliton.internal) via WireGuard DNS const config = { - host: '10.0.1.1', // INFRA VM - agiliton database + host: process.env.POSTGRES_HOST || 'infra.agiliton.internal', port: 5432, database: 'agiliton', user: 'agiliton',