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

Running MongoDb inside the same container is not working #22

Closed
j-holub opened this issue Nov 12, 2016 · 1 comment
Closed

Running MongoDb inside the same container is not working #22

j-holub opened this issue Nov 12, 2016 · 1 comment

Comments

@j-holub
Copy link

j-holub commented Nov 12, 2016

Hey,

first Thank You very much for this nice project, it might be exactly what will save my project from going into the trash bin (if it wasn't for Debian having a like 5 years old MPV player version).

So my application is a little unorthodox, it was never intended to run on a web server in some server cluster. It should run inside your home network on a Pi or your Laptop, that's why it has to be easy to set up (And meteor apps really are not...) and that's why for this app it perfectly fine to run MongoDb from inside in production mode.

What did I do?

For testing I downloaded the simple-todos app from the meteor repository

wget https://github.com/meteor/simple-todos.git

I created a Dockerfile and a launchpad.conf with INSTALL_MONGO=true. Then I ran

docker build -t jan/simple-todos

When I then tried to run it with

docker run  -p 80:3000 jan/test-todos

omitting the MONGO_URL as stated in your Readme, I get the following Error

=> Starting app on port 3000...
/opt/meteor/dist/bundle/programs/server/node_modules/fibers/future.js:280
						throw(ex);
						^

Error: MONGO_URL must be set in environment
    at Object.<anonymous> (packages/mongo/remote_collection_driver.js:36:11)
    at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
    at new Mongo.Collection (packages/mongo/collection.js:103:40)
    at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
    at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
    at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
    at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
    at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
    at /opt/meteor/dist/bundle/programs/server/packages/accounts-base.js:1798:15
    at /opt/meteor/dist/bundle/programs/server/packages/accounts-base.js:1809:3

I have checked your code and didn't find anywhere, where the environment variable MONGO_URL is actually set. All I found was the part in entrypoint.sh with the if condition, but it does not seem to actually set the MONGO_URL.

Unfortunately I'm not really good with bash scripting, that's why fixing it myself and opening a pull request wasn't possible.

I particularly tried it with the meteor example app, the rule out the possibility of my app having anything to do with it. It is just the plain simple-todos app, no modifications what so ever.

Cheers,

Jan

@jshimko
Copy link
Owner

jshimko commented Nov 13, 2016

This has been fixed in v1.1.1 (or :latest)

Thanks!

@jshimko jshimko closed this as completed Nov 13, 2016
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

2 participants