meteor-now
meteor-now copied to clipboard
Use multi stage Docker builds
First off: Thank you for creating this repository, it's a great start point for people who would like to set up Meteor on Now.
Just one Problem: It's not using multi-stage Docker builds. As a result, all users are currently seeing a limit about their code being above 100MB in size.
This is a hard limit that we put in place in order to make unfreezing much faster on Now Cloud v2.
In turn, it would be great if you could start using multi-stage Docker builds like here.
Came here because I'm having this problem. My app which had previously deployed fine many times is now getting this error. Apparently this limit is not new - I found this comment from a staff member on zeit's slack channel:
we’ve always had this restriction, however we have implemented more checks for limits recently so they might have just started being enacted for your account
Also, yes, thank you very much for creating meteor-now! It's been incredibly useful for me.
@leo and @qualitymanifest I've started a branch locally to use multi-stage builds to help reduce the ultimate docker image size. Unfortunately the build time goes up somewhat substantially with the current approach, so I'll probably default for it to be off (for those using a paid tier of ∆now) and you'll need to pass a flag like meteor-now -m(--multistage)
Cool! I'll keep my eyes peeled for the release. As for whether or not to have multistage builds be the default - from what I understand, the 100MB limit is not lifted with the paid plans. Per an email I got from Sergio at Zeit:
We limited the final built image to 100MiB in all plans.
I imagine most (all?) meteor projects are going to be over 100MB, so you might want to do it the other way around, and have a flag for non-multistage builds.
@jkrup For reference, here's an example @tootallnate sent us for a meteor deploy using multi-stage deploy: https://github.com/zeit/now-examples/pull/49
I have successfully deployed a meteor app to now using their example app as a guide (https://github.com/zeit/now-examples/tree/master/node-meteor) which employs alpine.
The final size is 51MB. No error and I'm using cloud: v2
edit: actually, it works without the .dockerignore file