starting to create dockerfile for ci work
This commit is contained in:
+7
-5
@@ -5,12 +5,14 @@ import path from 'path'
|
||||
const migrate = require('node-pg-migrate')
|
||||
|
||||
// Database connection configuration
|
||||
const { DB_USERNAME, DB_HOST, DB_DATABASE, DB_PASSWORD, DB_PORT } = process.env;
|
||||
|
||||
const dbConfig = {
|
||||
user: 'your_user',
|
||||
host: 'localhost',
|
||||
database: 'your_database',
|
||||
password: 'your_password',
|
||||
port: 5432,
|
||||
user: DB_USERNAME || 'your_user', // Use the environment variable if it exists, otherwise use 'your_user'
|
||||
host: DB_HOST || 'localhost',
|
||||
database: DB_DATABASE || 'your_database',
|
||||
password: DB_PASSWORD || 'your_password',
|
||||
port: parseInt(DB_PORT, 10) || 5432, // Convert the environment variable to a number if it exists, otherwise use 5432
|
||||
}
|
||||
|
||||
const pool = new Pool(dbConfig)
|
||||
|
||||
Reference in New Issue
Block a user