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

Different environment variables for different servers #244

Closed
artpolikarpov opened this issue Aug 25, 2016 · 13 comments
Closed

Different environment variables for different servers #244

artpolikarpov opened this issue Aug 25, 2016 · 13 comments

Comments

@artpolikarpov
Copy link

How to set different environment variables for different servers? Looks like env property in server object does nothing.

module.exports = {
    // Server authentication info
    "servers": {
        '1': {
            "host": "xxx.xxx.xxx.xx",
            "username": "user",
            "pem": "/Users/user/Projects/DEPLOY/google_compute_engine",
            "env": {
                "DYNO": "dyno-name",
                "ASSETS_HOST": "https://xxx.somecdn.com"
            }
        },

In your sample mup.js you even delete env property. So, how to differentiate variables from server to server?

@artpolikarpov
Copy link
Author

artpolikarpov commented Aug 25, 2016

In other issue I read that that feature is planed. But for me this one is absolutely critical, I already deployed servers in production and only after that I realized that you have removed that feature. Early (with mupx) it worked with no problem.

Can you point out where to start to bring this feature on? I’ll try to add it at least for myself (or will try to pr it back to you).

@madushan1000
Copy link
Contributor

This function takes care of env vars, I can't think of a direct way to implement the feature though. PRs are welcome :)

@artpolikarpov
Copy link
Author

I already found this function and still have no idea how to solve the problem. Now you build env object before iterating the session, but we need some way to revert it — to build uniq env for each session. Or find place where to extend env later.

@artpolikarpov
Copy link
Author

@madushan1000, can you help? I think it is a essential feature.

@etyp
Copy link

etyp commented Sep 14, 2016

+1 - @madushan1000 any chance we can get #248 merged in?

@madushan1000
Copy link
Contributor

I can merge it, but I can't test it at the time. So there would not be a npm release.

@madushan1000
Copy link
Contributor

One the other hand, if someone can write some tests, I can test them using out test rig.

@rclai
Copy link

rclai commented Mar 28, 2017

Please someone make the tests :(

@rclai
Copy link

rclai commented Mar 28, 2017

Also, shouldn't those custom env variables be in the meteor.servers[<server-key>][<custom_var>] instead of the servers.env object?

@stevenhornung
Copy link

Any updates here? Would love to get this feature merged!

@zodern zodern added this to TODO in 1.3.x May 23, 2017
@zodern
Copy link
Owner

zodern commented Aug 10, 2017

This will be available in 1.3.

@zodern zodern closed this as completed Aug 10, 2017
@zodern zodern moved this from TODO to Done in 1.3.x Aug 10, 2017
@sidzan
Copy link

sidzan commented May 24, 2018

Has this feature been implemented yet? Cheers!

@micahalcorn
Copy link

For reference, this is now implemented using the pattern meteor.servers.{name}.env. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.3.x
Done
Development

No branches or pull requests

8 participants