forked from jopeif/SmartMonitorAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
33 lines (32 loc) · 1.1 KB
/
ecosystem.config.js
File metadata and controls
33 lines (32 loc) · 1.1 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
module.exports = {
apps: [
{
name: 'django-api',
script: '/home/jarbas/.virtualenvs/django-env/bin/gunicorn',
args: 'projectSM.wsgi:application --bind 0.0.0.0:8000 --workers 3',
exec_mode: 'fork',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
DJANGO_SETTINGS_MODULE: 'projectSM.settings',
ENV: 'development',
},
env_production: {
DJANGO_SETTINGS_MODULE: 'projectSM.settings',
ENV: 'production',
},
},
],
deploy: {
production: {
user: 'jarbas',
host: 'smartmonitor.ifce.edu.br',
ref: 'origin/main',
repo: 'https://github.com/douglasnobree/SmartMonitorAPI.git',
path: '/home/jarbas/iot-django',
'post-deploy':
'export PATH=$PATH:/home/jarbas/.nvm/versions/node/v20.18.1/bin:/home/jarbas/.virtualenvs/django-env/bin && source /home/jarbas/.virtualenvs/django-env/bin/activate && pip install -r requirements.txt && python manage.py migrate && python manage.py collectstatic --noinput && pm2 reload ecosystem.config.js --env production',
},
},
};