abernix / meteord

MeteorD - Docker Runtime for Meteor Apps for Production Deployments
https://registry.hub.docker.com/u/meteorhacks/meteord/
MIT License
93 stars 129 forks source link

support NODE_OPTIONS environment variable #4

Closed pozylon closed 8 years ago

pozylon commented 8 years ago

that would help me a lot with my mini docker images. Change license: MIT

abernix commented 8 years ago

Thanks for submitting this – this is a reasonable change. As you can see on this v2 branch (which I've codenamed SpaceGlue), I've been toying around with some things for the last few days. The base image is far from a small footprint right now (more like 700 MB) and I'm going to try to make it smaller, but I'm doing this as a small side project which I submit commits to in the spare cycles of my other projects – I don't use it myself.

Given the recent conversation on Meteor Forums, I'm not sure how far I will go with development on this new version, but I've added some really nice features that I hope will be of assistance to others (namely, a really nice set of test packages and builds against several versions of Meteor). So I'll probably leave this here until I'm sure what's happening with this image. Hopefully we'll figure that out soon!

pozylon commented 8 years ago

Oh didn't see that conversation, having a joined force to deliver a good quality docker recipe is key I think. Saw those tests, really cool!

Currently your solution is the best and most compatible. That's why I would love to see that v2 branch maturing. I have about 20 instances in production with your current release on the docker hub, I'm not using v2 in production either but will be happy to test whenever you think status is fine. So if I can deliver any further features, test packages or whatever, just kick me, I'd be happy to contribute.

abernix commented 8 years ago

Thanks! Going to merge this in case I want to move some code around in the upcoming days (I probably will).

Even if this v2 doesn't go too far or another option becomes prevalent or more desirable, I'll try to get this published early this week as at least a proof of concept.

abernix commented 8 years ago

@pozylon If you want to try out abernix/spaceglue, you might have success with it. I tried it with a few of my projects and it worked well.

Anyhow, this is where the v2 branch ended up going. I changed the name and putting it on a different branch because I ended up re-writing everything and the chances of it re-converging with meteord are zero. I had to make a concession about full backward-compatibility support with mup, but hope to be able to fix it with a pull-request which permits additional options being passed to the docker container. Not sure if that's important to you or not!

Want to give it a try? Maybe open an issue in that repo to discuss any changes/modifications you find necessary?

Edit: In your own Dockerfile you'll want to use the ...-onbuild variation, or with meteord you would use ...-builddeps. You can theoretically use the (smaller) base image in combination with a BUNDLE_URL or the /bundle local mount if you ensure that the meteor build of that bundle was done on the same platform/architecture.