jshimko / meteor-launchpad

A base Docker image for Meteor applications.
https://hub.docker.com/r/jshimko/meteor-launchpad/
MIT License
276 stars 152 forks source link

Docker Compose won't launch Meteor App #61

Closed occasl closed 7 years ago

occasl commented 7 years ago

I'm attempting to use docker-compose to start my meteor app from the docker image created by meteor-launchpad (which builds fine). I see Mongo come up but meteor doesn't appear to fully initialize. I can run meteor run --settings settings.json on the project no problem but the image won't start. I think it has to do with the settings.json but I added it as ENVAR and included it in the compose, so not sure what else to try.

My docker-compose.yml:

  ipeople-meteor:
    image: ipeople-meteor:latest
    environment:
      ROOT_URL: http://localhost:3000
      MONGO_URL: mongodb://mongo:27017/meteor
      MAIL_URL: smtp://smtp.myhost.com
      METEOR_SETTINGS
    links:
      - mongo
    ports:
      - "4200:3000"
  mongo:
    image: mongo:latest
    command: mongod --storageEngine=wiredTiger

My logs are showing:

✗ docker-compose up
WARNING: Dependency conflict: an older version of the 'docker-py' package may be polluting the namespace. If you're experiencing crashes, run the following command to remedy the issue:
pip uninstall docker-py; pip uninstall docker; pip install docker
Starting ipeopleui_mongo_1 ...
Starting ipeopleui_mongo_1 ... done
Starting ipeopleui_ipeople-meteor_1 ...
Starting ipeopleui_ipeople-meteor_1 ... done
Attaching to ipeopleui_mongo_1, ipeopleui_ipeople-meteor_1
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=3a0c6b7e85db
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] db version v3.4.1
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] git version: 5e103c4f5583e2566a45d740225dc250baacfbd7
ipeople-meteor_1  | => Starting app on port 3000...
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1t  3 May 2016
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] allocator: tcmalloc
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] modules: none
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] build environment:
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten]     distmod: debian81
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten]     distarch: x86_64
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten]     target_arch: x86_64
mongo_1           | 2017-09-12T13:37:28.937+0000 I CONTROL  [initandlisten] options: { storage: { engine: "wiredTiger" } }
mongo_1           | 2017-09-12T13:37:28.937+0000 W -        [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
mongo_1           | 2017-09-12T13:37:28.942+0000 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
mongo_1           | 2017-09-12T13:37:28.942+0000 I STORAGE  [initandlisten]
mongo_1           | 2017-09-12T13:37:28.942+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
mongo_1           | 2017-09-12T13:37:28.942+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
mongo_1           | 2017-09-12T13:37:28.942+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=487M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
mongo_1           | 2017-09-12T13:37:29.340+0000 I CONTROL  [initandlisten]
mongo_1           | 2017-09-12T13:37:29.340+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
mongo_1           | 2017-09-12T13:37:29.340+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
mongo_1           | 2017-09-12T13:37:29.340+0000 I CONTROL  [initandlisten]
mongo_1           | 2017-09-12T13:37:29.344+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
mongo_1           | 2017-09-12T13:37:29.345+0000 I NETWORK  [thread1] waiting for connections on port 27017
mongo_1           | 2017-09-12T13:37:30.006+0000 I FTDC     [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK
mongo_1           | 2017-09-12T13:37:30.336+0000 I NETWORK  [thread1] connection accepted from 172.20.0.3:57444 #1 (1 connection now open)
mongo_1           | 2017-09-12T13:37:30.342+0000 I NETWORK  [conn1] received client metadata from 172.20.0.3:57444 conn1: { driver: { name: "nodejs", version: "2.2.24" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.41-moby" }, platform: "Node.js v4.8.4, LE, mongodb-core: 2.1.8" }
jshimko commented 7 years ago

I see ipeople-meteor_1 | => Starting app on port 3000... in there. Are you sure it's not running?

Also, do you have the latest versions of docker and docker-compose? That error at the beginning sounds like you may not.

How did you add your settings.json to METEOR_SETTINGS?

jshimko commented 7 years ago

I also see the mongo client in your app connecting to the db (last 2 lines)

2017-09-12T13:37:30.336+0000 I NETWORK  [thread1] connection accepted from 172.20.0.3:57444 #1 (1 connection now open)
2017-09-12T13:37:30.342+0000 I NETWORK  [conn1] received client metadata from 172.20.0.3:57444 conn1: { driver: { name: "nodejs", version: "2.2.24" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.9.41-moby" }, platform: "Node.js v4.8.4, LE, mongodb-core: 2.1.8" }
occasl commented 7 years ago

I got it working. Thanks for looking.