Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: deploy configurations to have "env" variables #748

Closed
koresar opened this issue Oct 1, 2014 · 1 comment
Closed

Feature: deploy configurations to have "env" variables #748

koresar opened this issue Oct 1, 2014 · 1 comment

Comments

@koresar
Copy link

koresar commented Oct 1, 2014

I wish I could avoid "env_staging": { "NODE_ENV": "staging" } lines in each of my (dozens) of microservices.

{
  "apps": [
    {
      "name": "app1",
      "script": ".",
      "env_staging": { "NODE_ENV": "staging" }
    },
    {
      "name": "app2",
      "instances": "1",
      "env_staging": { "NODE_ENV": "staging" }
    }
  ],
  "deploy": {
    "staging": {
      "user": "username",
      "host": "192.168.0.52",
      "ref": "origin/staging",
      "repo": "repo@url.git",
      "path": "/home/username",
      "post-deploy": "npm install && (pm2 stop all; gulp && pm2 startOrRestart ecosystem.json --env staging)"
    }
  }

Can we have default ENV variables per each deploy record? Like:

{
  "deploy": {
    "staging": {
      // ...
      "env_staging": {
        "NODE_ENV": "staging",
        "DB_CONNECTION_STRING": "mongo://db-server/staging"
      }
      // ...
    }
}
@Unitech
Copy link
Owner

Unitech commented Oct 8, 2014

Could you report this suggestion to : https://github.com/Unitech/pm2-deploy/issues

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants