CyCoreSystems / docker-meteor

Dockerfile and script for running Meteor on Docker
MIT License
120 stars 73 forks source link

Does not work #19

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi there,

I want to use a meteor bundle created before and put this into my docker image, since the meteor tool wastes too much space on the image. Looking at the entrypoint.sh file, I would have to put the BUNDLE_DIR name into the APP_DIR and then it finds the bundle but it would not be extracted like in BUNDLE_URL or METEOR_DIR. So does that work, I mean to upload a bundle from my local machine?

Ulexus commented 8 years ago

BUNDLE_DIR is for bundle directories (using the --directory option to meteor build). Hence, there is no extraction, because it is already extracted. In general, you would not set BUNDLE_DIR as a user, but use APP_DIR. If you supply APP_DIR, the script will search APP_DIR for a proper Meteor bundle. Thus, it is more forgiving than supplying BUNDLE_DIR explicitly.

If you supply a BUNDLE_URL, it is presumed that the bundle is a tarball. It will be downloaded and extracted.

If you have unbuilt Meteor source, you would supply SRC_DIR.

Is something actually not working for you, or are you just trying to figure out how to use this?

ghost commented 8 years ago

Hi @Ulexus 👍 the --directory hint would have been what was missing. everything else is clear, but thank you, didn't know that. I will try that when I got time.

ghost commented 8 years ago

Hi again,

I cannot find the problem, sorry. If I am providing docker with -e APPDIR=/my/bundle/dir, still I get "Unable to locate server directory."_, although the subdirectories /programs/server are there, as in your entrypoint.sh required. Also I suppose BUNDLE_DIR cannot be set directly, since it is set initially in line 118 of the shell script. Maybe before that line, in line 117 it should be tested, whether BUNDLE_DIR =="" or already has a value, although I am not sure, since I don't do a lot of shell scripting.

Regards

Ulexus commented 8 years ago

Right you are. I've just worked up a fix, but now I am noticing the documentation and the implementation have diverged a fair bit. Correcting this.

Ulexus commented 8 years ago

Fixed in 35583e259c9f420f9815492b053aceddac0e882b

ghost commented 8 years ago

Thank you again, @Ulexus

now I got it at least to run in my local docker engine. I can "docker ps" and see the image and also in Kitematic it is shown. But still no website, sorry, I have tried to mount it from 3000->3000 and everything. I start it (simple Meteor create test example) with: _docker run --rm -e ROOT_URL=http://192.168.99.100 -p 3000:3000 -v /Users/bundledir/:/var/www ulexus/meteor& Also tried localhost, Kitematic shows: docker port 80 -> mac port 192.168.99.100: docker port 3000 -> mac port 192.168.99.100:3000

Cannot see the website, but I have the feeling that I am really close to my first docker success with meteor after weeks of trying.

Regards

ghost commented 8 years ago

now it goes, with -p 80:80

thank you again