弃用 pm2, 使用 systemctl 管理进程
This commit is contained in:
		
							
								
								
									
										17
									
								
								webp.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								webp.service
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=WEBP接口服务
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
ExecStart=/root/webp/main
 | 
			
		||||
StandardOutput=append:/root/webp/webp.log
 | 
			
		||||
StandardError=inherit
 | 
			
		||||
Restart=always
 | 
			
		||||
User=root
 | 
			
		||||
Group=root
 | 
			
		||||
Environment=PATH=/usr/bin:/usr/local/bin
 | 
			
		||||
Environment=NODE_ENV=production
 | 
			
		||||
WorkingDirectory=/root/webp/
 | 
			
		||||
MemoryMax=4G
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
		Reference in New Issue
	
	Block a user