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

Common ENV for several apps in a JSON declaration #1479

Open
miriti opened this issue Jul 29, 2015 · 3 comments
Open

Common ENV for several apps in a JSON declaration #1479

miriti opened this issue Jul 29, 2015 · 3 comments

Comments

@miriti
Copy link

miriti commented Jul 29, 2015

It would be great to have a possibility to declare ENV variables in the json file and make them common for several apps. Currentelly I'm doing it like this:

{
  "apps": [
    {
       "name": "api",
       "env": {
         "API_HOST": "api.service.com",
         "API_PORT": 80
       }
    },
    {
       "name": "service",
       "env": {
          "API_HOST": "api.service.com",
          "API_PORT": 80
        }
    }
  ]
}

It would be great to be able to do something like:

{
  "apps": [
    {
       "name": "api"
    },
    {
       "name": "service"
    }
  ],
 "env": {
   "API_HOST": "api.service.com",
   "API_PORT": 80
 }
}

In both apps API_HOST and API_PORT variables will be available.

Or maybe there is a way to do this with json declaration? I couldn't find anything...

@zacbarton
Copy link

This would be really handy!

@xpepermint
Copy link

The right place for env variables is the package.json file. Check this https://docs.npmjs.com/cli/config. We are waiting for #702 to be resolved.

@miriti
Copy link
Author

miriti commented May 6, 2016

It's been a while. Anything on that?
I'm not sure that package.json is a right place because sometimes you want to have several app declaration files but you can have only one package.json.

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

4 participants