Minor improvements
This commit is contained in:
		
							parent
							
								
									301aa11122
								
							
						
					
					
						commit
						1d9d938052
					
				@ -26,4 +26,5 @@ source "${CONF_FOLDER}/${configfile}"
 | 
			
		||||
 | 
			
		||||
cd ${pkg.installFolder}
 | 
			
		||||
 | 
			
		||||
exec /bin/sh -c "node server.js"
 | 
			
		||||
# This will forward this PID 1 to the node.js and forward SIGTERM for graceful shutdown as well
 | 
			
		||||
exec node server.js
 | 
			
		||||
 | 
			
		||||
@ -8,8 +8,8 @@
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "pkg": "tsc && pkg -t node16-linux-x64,node16-win-x64 --out-path ./target ./target/src && node install.js",
 | 
			
		||||
    "test": "echo \"Error: no test specified\" && exit 1",
 | 
			
		||||
    "start": "nodemon --watch '.' --ext 'ts' --exec 'WEB_FOLDER=./target/web ts-node server.ts'",
 | 
			
		||||
    "start-prod": "nodemon --watch '.' --ext 'ts' --exec 'WEB_FOLDER=./target/web NODE_ENV=production ts-node server.ts'",
 | 
			
		||||
    "start": "nodemon --watch '.' --ext 'ts' --exec 'ts-node server.ts'",
 | 
			
		||||
    "start-prod": "nodemon --watch '.' --ext 'ts' --exec 'NODE_ENV=production ts-node server.ts'",
 | 
			
		||||
    "build": "tsc"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,8 @@ let httpServer: HttpServer;
 | 
			
		||||
})();
 | 
			
		||||
 | 
			
		||||
process.on('SIGTERM', () => {
 | 
			
		||||
    process.exit();
 | 
			
		||||
    logger.info('SIGTERM signal received');
 | 
			
		||||
    process.exit(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
process.on('exit', async () => {
 | 
			
		||||
@ -81,5 +82,5 @@ process.on('exit', async () => {
 | 
			
		||||
    if (queues) {
 | 
			
		||||
        queues.exit(0);
 | 
			
		||||
    }
 | 
			
		||||
    logger.info('JavaScript Executor Microservice has been stopped.');
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user