Skip to content

Commit

Permalink
fix: added mx ecosystem file
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Dec 9, 2024
1 parent 335232e commit 6c5f335
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ansible/playbooks/templates/ecosystem-mx.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"apps": [
{
"name": "mx",
"script": "mx.js",
"max_restarts": 999,
"exec_mode": "cluster",
"wait_ready": true,
"instances": "max",
"pmx": false,
"env_production": {
"NODE_ENV": "production"
}
}
],
"deploy": {
"production": {
"user": "deploy",
"host": [{% for host in groups['mx'] %}"{{ hostvars[host].ansible_host }}"{% if not loop.last %}, {% endif %}{% endfor %}],
"ref": "origin/master",
"repo": "{{ lookup('env', 'GITHUB_REPO') }}",
"path": "/var/www/production",
"pre-deploy": "git reset --hard",
"post-deploy": "pnpm install && NODE_ENV=production npm start build && pm2 startOrGracefulReload ecosystem-mx.json --env production --update-env"
}
}
}

0 comments on commit 6c5f335

Please sign in to comment.