-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
45 lines (45 loc) · 1.3 KB
/
ecosystem.config.js
File metadata and controls
45 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = {
apps: [
{
name: 'Probe',
version: '0.5.02',
script: 'app.js',
watch: false,
ignore_watch: [
// pm2 delete 0;pm2 startOrReload ecosystem.config.js --update-env; pm2 logs --raw
// ou
// pm2 restart 0
'node_modules',
'./node_modules',
'./config/stations',
'./config/compositeProbes.json',
'./config/Units.json',
'./config/credential.json',
'./public',
'./docs',
'./.git',
'./logs/*', // Ajout explicite pour ignorer tout le contenu du répertoire logs
'*.log', // Ignorer tous les fichiers .log à la racine
'**/*.log', // Ignorer tous les fichiers .log dans tous les sous-répertoires
'./visits' // Ignorer
],
max_memory_restart: '300M',
instances: 1,
exec_mode: 'fork',
env: {
NODE_ENV: 'development',
PORT: 2222,
watch: true,
},
env_production: {
NODE_ENV: 'production',
PORT: 2222,
watch: false // Désactiver watch en production
},
log_file: '/var/log/pm2/Probe/combined.log',
out_file: '/var/log/pm2/Probe/out.log',
error_file: '/var/log/pm2/Probe/error.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z'
},
],
};