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

added Deploy Q&A for sending static keys to clients #36

Closed
wants to merge 1 commit into from
Closed

added Deploy Q&A for sending static keys to clients #36

wants to merge 1 commit into from

Conversation

BretFisher
Copy link

No description provided.

@tmeasday
Copy link
Member

tmeasday commented Oct 5, 2013

Hey @BretFisher -- Thanks! This is a good one.

I think the more correct way is to pass the settings in through the METEOR_SETTINGS environment variable though. Something like

export METEOR_SETTINGS="$(cat /path/to/production-settings.json)"
node main.js

I haven't actually directly tested the above, but something like that should work.

[FYI @zol]

@BretFisher
Copy link
Author

Still a bit confused about proper usage. So those of us running on our own servers and not meteor.com, we're likely running a shell or init.d script right? So METEOR_SETTINGS doesn't replace MONGO_URL, ROOT_URL, or MAIL_URL I assume? but can be used for all other custom app settings?

So if I'm correct, then my sh would still have exports for the standard Meteor environment vars, and a cat settings.json for anything custom?

@tmeasday
Copy link
Member

tmeasday commented Oct 7, 2013

Yes, you are correct. It's a little blurred, but my takeaway is that the settings.json is for application settings and the environment variables are for server settings. Thus when you deploy to meteor.com or run locally, you don't need to think about environment variables at all.

@mitar
Copy link
Member

mitar commented Dec 4, 2013

Yes. I think it is better to use settings.json than what is recommended in this pull request. Do not forget that if you want something to be available on the client, you have to put it under public key in settings.json.

@BretFisher BretFisher closed this Sep 8, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants