Trying to configure Meteor on AWS / EBS (Amazon Web Services, Elastic Beanstalk).
The Meteor debugger can be passed a command line flag: --settings settings.json where settings.json is a file containing server / client / value configurations (like correctly formatted JSON).
Instead of passing the configuration file on the command line, the Meteor deployment uses the METEOR_SETTINGS environment METEOR_SETTINGS . If provided, it is expected that it will contain a json document, such as the contents of settings.json , for example:
$ METEOR_SETTINGS=$(cat settings.json) $ echo $METEOR_SETTINGS { "public": { "s3path": "https://d2v4p3rms9rvi3.cloudfront.net" } }
The problem is that when I set the METEOR_SETTINGS value for this value in the EBS console:

AWS / EBS discards quotes, avoids slashes (as shown in the screenshot), and sends a Meteor:
{public:{s3path:https:\/\/d2v4p3rms9rvi3.cloudfront.net}}
As indicated by the node launch error:
------------------------------------- /var/log/nodejs/nodejs.log ------------------------------------- npm WARN deprecated backwards-incompatible changes made to `npm run-script` and npm WARN deprecated semver behavior. > meteor-dev-bundle@0.0.0 start /var/app/current > node main.js /var/app/current/programs/server/boot.js:283 }).run(); ^ Error: METEOR_SETTINGS are not valid JSON: {public:{s3path:https:\/\/d2v4p3rms9rvi3.cloudfront.net}} at packages/meteor/packages/meteor.js:21:1 at Package (packages/meteor/packages/meteor.js:42:1) at /var/app/current/programs/server/packages/meteor.js:1277:4 at /var/app/current/programs/server/packages/meteor.js:1286:3 at /var/app/current/programs/server/boot.js:242:10 at Array.forEach (native) at Function._.each._.forEach (/var/app/current/node_modules/underscore/underscore.js:79:11) at /var/app/current/programs/server/boot.js:137:5
Attacking this problem, I tried all kinds of variations for the JSON object in the value field: avoiding quotes, covering the entire json part with single quotes, replacing double quotes with single quotes and other attempts - and didn't solve it.
Question:
How to set METEOR_SETTINGS so that Meteor rcv and correctly disassemble it?
Note. One of the requirements is that the same assembly is deployed in dev, staging and production environments. Configurations must be set separately for each environment, so if there is another way to insert settings into the EBS environment without modifying the assembly, which will also solve it.
amazon-web-services elastic-beanstalk meteor amazon-elastic-beanstalk
tivoni
source share