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 #29

Open
koresar opened this issue Nov 26, 2014 · 0 comments
Open

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

koresar opened this issue Nov 26, 2014 · 0 comments

Comments

@koresar
Copy link

koresar commented Nov 26, 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 to avoid repetitiveness? Like:

{
  "deploy": {
    "staging": {
      // ...
      "env": {
        "NODE_ENV": "staging"
      }
      // ...
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant