-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
34 lines (34 loc) · 1.12 KB
/
ecosystem.config.js
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
module.exports = {
apps: [{
name: 'MMMDjangoServer',
interpreter: __dirname + '/venv/bin/python',
script: __dirname + '/manage.py',
args: 'runserver 0.0.0.0:80',
instances: 1,
autorestart: true,
watch: false,
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}, {
name: 'OnlineTestingBot',
interpreter: __dirname + '/venv/bin/python',
script: __dirname + '/bot.py',
instances: 1,
autorestart: true,
watch: false
}],
deploy: {
production: {
user: 'root',
host: require(__dirname + '/credentials.json').server_ip,
ref: 'origin/develop',
repo: '[email protected]:BardinPetr/MassMediaMonitoringSystem.git',
path: '/home/root/deployment',
'post-deploy': 'npm i && source venv/bin/activate && venv/bin/pip install -r requirements.txt && npm run-script build && python manage.py collectstatic --noinput && pm2 reload ecosystem.config.js --env production'
}
}
};