frontend work !
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m40s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m40s
This commit is contained in:
@@ -161,5 +161,5 @@ jobs:
|
||||
npm install --omit=dev # Install only production dependencies
|
||||
# Use `startOrReload` with the ecosystem file. This is the standard, idempotent way to deploy.
|
||||
# It will START the process if it's not running, or RELOAD it if it is.
|
||||
pm2 startOrReload ecosystem.config.js --env production
|
||||
pm2 startOrReload ecosystem.config.cjs --env production
|
||||
echo "Backend server reloaded successfully."
|
||||
@@ -1,6 +1,7 @@
|
||||
// ecosystem.config.js
|
||||
// ecosystem.config.cjs
|
||||
// This file is the standard way to configure applications for PM2.
|
||||
// It allows us to define all the settings for our application in one place.
|
||||
// The .cjs extension is required because the project's package.json has "type": "module".
|
||||
|
||||
module.exports = {
|
||||
apps: [{
|
||||
@@ -14,13 +14,15 @@ const createPool = (): Pool => {
|
||||
logger.info(` Database: ${process.env.DB_DATABASE}`);
|
||||
logger.info('----------------------------------------------------');
|
||||
|
||||
return new Pool({
|
||||
const newPool = new Pool({
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
database: process.env.DB_NAME || 'flyer-crawler',
|
||||
password: process.env.DB_PASSWORD || 'your_db_password',
|
||||
port: parseInt(process.env.DB_PORT || '5432', 10),
|
||||
});
|
||||
logger.info(`Database connection pool created for host: ${process.env.DB_HOST || 'localhost'}`);
|
||||
return newPool;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user