frontend work !
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m44s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m44s
This commit is contained in:
@@ -159,8 +159,7 @@ jobs:
|
||||
echo "Installing production dependencies and restarting server..."
|
||||
cd /var/www/flyer-crawler.projectium.com
|
||||
npm install --omit=dev # Install only production dependencies
|
||||
# Use pm2 to reload the application with zero downtime.
|
||||
# This assumes you have a pm2 process named 'flyer-crawler-api' configured on your server.
|
||||
# If not, you would use `pm2 start npm --name "flyer-crawler-api" -- run start` for the first time.
|
||||
pm2 reload flyer-crawler-api
|
||||
# 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
|
||||
echo "Backend server reloaded successfully."
|
||||
14
ecosystem.config.js
Normal file
14
ecosystem.config.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// ecosystem.config.js
|
||||
// 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.
|
||||
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'flyer-crawler-api', // The name of our application in PM2
|
||||
script: 'npm', // The script to run (we want to run an npm command)
|
||||
args: 'run start', // The arguments to pass to the script (i.e., 'npm run start')
|
||||
env_production: {
|
||||
NODE_ENV: 'production', // Set the Node.js environment to production
|
||||
},
|
||||
}],
|
||||
};
|
||||
Reference in New Issue
Block a user