This commit is contained in:
Wells Bunker 2025-09-24 17:22:37 -06:00
parent d92693413e
commit 6919bdd416
No known key found for this signature in database
GPG Key ID: DB16D6F2679B78FC
2 changed files with 3 additions and 3 deletions

View File

@ -109,6 +109,7 @@ jobs:
BRAINTRUST_KEY: ${{ secrets.BRAINTRUST_KEY }}
BRAINTRUST_API_KEY: ${{ secrets.BRAINTRUST_API_KEY }}
TRIGGER_SECRET_KEY: ${{ secrets.TRIGGER_SECRET_KEY }}
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}

View File

@ -13,18 +13,17 @@ const projectRoot = join(__dirname, '..');
// Database connection details from docker-compose.yml
const DB_HOST = 'localhost';
const DB_PORT = '54322';
const DB_NAME = 'postgres';
const DB_USER = 'postgres';
const DB_PASSWORD = 'postgres';
// Function to check if database is accessible
function isDatabaseRunning(): boolean {
try {
// Use pg_isready to check if PostgreSQL is accepting connections
execSync(`pg_isready -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER}`, {
const result = execSync(`pg_isready -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER}`, {
stdio: 'pipe',
timeout: 45000
});
console.info('pg_isready result:', result);
return true;
} catch (error) {
return false;