Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use --settings option when starting the container? #83

Open
viveksd87 opened this issue Mar 13, 2016 · 3 comments
Open

How to use --settings option when starting the container? #83

viveksd87 opened this issue Mar 13, 2016 · 3 comments

Comments

@viveksd87
Copy link

We have built a meteor app that requires --settings to be specified for using S3 bucket information.

To run on our local we typically use the command:
meteor run --settings settings.json

Even to deploy on meteor.com we would say:
meteor deploy --settings settings.json

How do we specify the settings parameter when using the image to deploy it within a container?

@jupiterkenji
Copy link

May be this:
docker run ... -e METEOR_SETTINGS="$(cat ~/myfolder/settings.json)"

@schandrac
Copy link

pass an environment variable. I pass it via environment option in docker-compose file

  • METEOR_SETTINGS={"public":{"portal_url":"my-url-here"}}

@krstffr
Copy link

krstffr commented Apr 8, 2016

You can create a file (let's call it .dockerenv) with your env vars listed like this…

ROOT_URL=http://localhost
MONGO_URL=mongodb://123.456.789.123:27017,123.456.789.124:27017/flow?replicaSet=rs0&readPreference=primaryPreferred&w=majority
MONGO_OPLOG_URL=mongodb://oplogger:MYPASSWORD@123.456.789.123:27017,123.456.789.124:27017/local?authSource=admin
MAIL_URL=smtp://postmaster%40myname.mailgun.org:MYPASSWORD@smtp.mailgun.org:2525

…and then run docker run using the --env-file flag pointing to the file like this: docker run --env-file .dockerenv

Yey! That's pretty close to the classic meteor settings.json file!

(I found this info in this excellent article: http://markshust.com/2016/02/01/creating-custom-production-docker-image-meteor-13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants