1

I have a problem with a large Meteor settings file and Phusion Passenger + Nginx and Meteor bundled app. When i have a small config file, no problem. but if i have a big config file, i can't start the app. i think to link the json file in nginx conf file. but the error is the same

Error: METEOR_SETTINGS are not valid JSON.

this is some try that i have done without success

passenger_env_var METEOR_SETTINGS $mSETTINGS;

passenger_env_var METEOR_SETTINGS /etc/nginx/sites-enabled/backend.conf;

passenger_env_var METEOR_SETTINGS '{"miao":"bau"}';

passenger_env_var METEOR_SETTINGS /home/system/meteorSettings/backendSettings.json;

can anyone help me? Thank you!

Marco Tribuzio
  • 103
  • 1
  • 1
  • 6
  • Came to a similar point where I splitted the settings file into several Env variables of json strings and parsed them at startup. Would be great to see a solution to that issue, too. – Jankapunkt Aug 05 '18 at 11:37

1 Answers1

1

I see 2 ways of dealing with this:

1) put your settings into the database - your startup script can read them into a settings object, and a module provided to allow your code to access them as you would a constants file.

2) Use Meteor up for your deployment. Then your settings file isn't limited in size. http://meteor-up.com/ Meteor up is a really powerful deployment choice, and even looks after proxying and ssl certificates automatically.

Mikkel
  • 7,693
  • 3
  • 17
  • 31