ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m30s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m30s
This commit is contained in:
@@ -4,16 +4,30 @@
|
||||
// The .cjs extension is required because the project's package.json has "type": "module".
|
||||
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'flyer-crawler-api', // The name of our application in PM2
|
||||
// Explicitly set the working directory. This is crucial for reliability.
|
||||
cwd: '/var/www/flyer-crawler.projectium.com',
|
||||
// Use `tsx` directly as the interpreter. PM2 will find it in node_modules/.bin.
|
||||
// This is more robust than calling `node` on the script path.
|
||||
script: './node_modules/.bin/tsx',
|
||||
args: 'server.ts',
|
||||
env_production: {
|
||||
NODE_ENV: 'production', // Set the Node.js environment to production
|
||||
apps: [
|
||||
{
|
||||
name: 'flyer-crawler-api', // The name of our API application in PM2
|
||||
// Use tsx as the interpreter and pass the preload script via node_args.
|
||||
script: './node_modules/.bin/tsx',
|
||||
args: 'server.ts',
|
||||
node_args: '-r ./preload.ts',
|
||||
// Explicitly set the working directory. This is crucial for reliability.
|
||||
cwd: '/var/www/flyer-crawler.projectium.com',
|
||||
env_production: {
|
||||
NODE_ENV: 'production', // Set the Node.js environment to production
|
||||
},
|
||||
},
|
||||
}],
|
||||
{
|
||||
name: 'flyer-crawler-worker', // The name of our worker process in PM2
|
||||
// Use the same preload mechanism for the worker.
|
||||
script: './node_modules/.bin/tsx',
|
||||
args: 'src/services/queueService.server.ts',
|
||||
node_args: '-r ./preload.ts',
|
||||
// Explicitly set the working directory.
|
||||
cwd: '/var/www/flyer-crawler.projectium.com',
|
||||
env_production: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
}
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user