简体   繁体   中英

Connecting to external mongodb from meteor app in docker

I'm moving an existing meteor app into docker. The staging instance (using the node base image) works fine and can connect to a db with the link given, but using the same mongo url in an alpine container ( meteor-base ) silently fails. There was a browser console error, but only after trying to sign in, the meteor part is definitely working it's just the db: "Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue."

I should add that I did a meteor build outside the docker container and got everything working. I am passing the url in through docker-compose.

I'm not familiar enough with docker to know if maybe there's some obvious meteor dependency that gets left out with alpine. If this was the case, wouldn't the app just not render or not build though?

Versions: meteor 1.8.0 node 8.11.4

I tried to use node alpine version with Meteor apps, but I didn't have success. Then I chose images thin and works fine.

My opinion, if you don't have anything in Alpine that you need, don't use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM