Search code examples
meteordeploymentkadira

Mupx fail deployment with settings.json


For those who use Digital Ocean for hosting and mupx for deployment: I can not successfully implement usage of settings.json file to run on deployment. Previously it caused failure of deployment, and now, for instance, when I tried to add the package okgrow:analytics, it doesn't work and this appear on browser console:

Missing analyticsSettings in Meteor.settings.public

although it is there.

{
  "public": {
    "analyticsSettings": {
      "Google Analytics" : {
        "trackingId": "xxxxxxx"
      }
    }
  }
}

When running locally, one has to type meteor --settings settings.json to start the app. Is there something equivalent for the mupx? How can I configure accordingly?

Needless to say, I need settings.json for sensitive data which shall be ignored for git as well. Perhaps just meteor command should first check if settings.json exists, and accordingly run with the settings inside (if any). Then one doesn't need to type meteor --settings settings.json...


Solution

  • I realised my problem was due to having the settings.json file in the root of the project rather than within the mupx deploy folder.

    It was sufficient, then, to just run mupx deploy