since 2018
I faced such a big problem, but now everything is solved.
When you use PM2 for your custom Meteor App development, simply place the process.json file inside the bundle and run the command below.
pm2 start process.json
The following are the parameters for the process.json file that I wanted to pass as METEOR_SETTINGS in a production environment,
{ "apps": [ { "name": "My APP", "script": "./main.js", "log_date_format": "YYYY-MM-DD", "exec_mode": "fork_mode", "env": { "PORT": 3000, "MONGO_URL": "mongodb://username: password@127.0.0.1 :27017/dbname", "ROOT_URL": "http://hostname/", "METEOR_SETTINGS": { "MAIL_URL": "smtps://<your username>:<your password>@smtp.gmail.com:465", "AUTHKEY": "185938A0asmD231231231231e4992", "HOSTNAME": "some example", "public": { "COMPANY_NAME": "Some Company Name" } } } } ] }
So, in the above code, you can see how I set METEOR_SETTINGS .
Ankur soni
source share