diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..d460eef --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,46 @@ +const path = require('path'); + +module.exports = { + apps: [ + { + name: "plancake-site", + cwd: path.join(__dirname, '../frontend'), + script: "npm", + args: "start", + env: { + NODE_ENV: "production", + PORT: 3000 + }, + instances: 1, + autorestart: true, + max_memory_restart: "200M", + }, + { + name: "plancake-api", + cwd: __dirname, + script: "./.venv/bin/python", + args: "-m gunicorn api.wsgi --bind 127.0.0.1:8000", + instances: 1, + autorestart: true, + max_memory_restart: "150M", + }, + { + name: "celery-worker", + cwd: __dirname, + script: "./.venv/bin/python", + args: "-m celery -A api worker --loglevel=info", + instances: 1, + autorestart: true, + max_memory_restart: "150M", + }, + { + name: "celery-beat", + cwd: __dirname, + script: "./.venv/bin/python", + args: "-m celery -A api beat --loglevel=info", + instances: 1, + autorestart: true, + max_memory_restart: "100M", + }, + ] +}; \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 6a43781..8f4c2ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,6 +15,7 @@ django-cors-headers==4.9.0 django-environ==0.12.0 django-ses==4.4.0 djangorestframework==3.16.0 +gunicorn==23.0.0 jmespath==1.0.1 kombu==5.5.4 packaging==25.0