Staging environment is not getting set

I am new to meteor, want to know why staging environment is not getting set as like development and production.

I have a staging environment that I set up in Meteor using the settings.json file that can be accessed via Meteor.settings and it works perfectly :slight_smile:

Make sure when you run or deploy Meteor that you are using something like:

Running locally:

meteor --settings settings-staging.json

Deploying to Galaxy:

DEPLOY_HOSTNAME=us-east-1.galaxy-deploy.meteor.com meteor deploy staging.yourdomain.com --settings settings-staging.json

You make your app rely on the data in the settings-staging.json file by using the Meteor.settings API which never needs to be changed in your app.

This a really great Meteor design! Hope you enjoy Meteor. :grinning:

1 Like

@mullojo Thanks for your valuable feedback. Locally it works perfectly! Just want to know one more thing that my staging environment is running with Docker so I need to confirm whether I should just add DEPLOY_HOSTNAME… inside Dockerfile to rely my staging Data on it?

Thanks!

OK so guys i finally dive into it and got the solution for it.

We only need to make couples of changes -

1- We have to add ENV METEOR_SETTINGS="" in docker file located on the root directory of our project.

2- Run the docker after build get compile successfully with command including the value of setting, as in my case it was :- docker run -e METEOR_SETTINGS="$(cat settings/staging.json)" .

It will start taking data of your json kept in this file which you need to rely on staging.