Why build production version? What EXACTLY is the benefit?

I’m ready to throw my production build out lol… what a nightmare.

Works perfect on localhost, but when I push through my CICD one tiny little thing is off and Meteor blows up.

I have a version where I’m running Meteor on a docker image in the cloud and its working perfect.

My build script is SUPER fat, super heavy, takes forever to compile.

Why not just have my CICD do a git pull from my main branch and restart Meteor? Building is killing me.

How many people are in your team pushing Meteor updates?

Solo dev, just me. But again, I already have a CICD process infront of me.

Even if I had 10 devs, main branch is protected for code review and would follow the same CICD.

I had an issue in my build script, it was using the download meteor script, and now I have to target a meteor build specifically, I ended up pulling from github with a specific release; builds now succeeding.

A Meteor production build is necessary to deliver your assets in single files (one for CSS and one for JS). Meteor also handles other aspects differently in production.

When you build your project, you don’t have “Meteor” as a runtime as you do during development with Meteor tools running Proxy, HMR and other processes to you.

In a production build, a Meteor is a Node.js app in the backend, with assets ready for delivery to the client.

That said, how long is your build taking?

A small (almost empty) Meteor app should take no more than 3 minutes (see screenshot from quave template):

A large Meteor app shouldn’t take more than 10 minutes or, in rare cases, up to 15 minutes.

Yeah I’d say the build is 15 minutes… My Meteor project is huge. I basically rewrote Wordpress in Meteor… then added 25 plugins like WooCommerce but, in Meteor.

it’s been 8 years coding in Meteor.

So yeah I get that its a node app, and FINALLY its running. Its building dockers, pushing out to Kubernetes… but omg the build process sucks.

When I update my CICD its about an hour before the changes hit prod servers.

I’m super tempted to just… build a Meteor docker and run the source code! lol It would be about 5 minutes tops for CICD.

But I’m sorta just accepting my 1 hour push window… I guess that’s fine.

1 Like

I’m at www.ScalarSites.com btw

Even the landing page is produced by Meteor! (This is not SSR or whatever, I’m literally building the pages html and serving them from web servers)

1 Like

I don’t get it.

If your build takes 15 mins or 30 mins that should be your time to be live + 1 min to replace containers.

Is it more than that? If yes, why? Where are the other mins being spent?

Naw I suppose it’s fine… build 30 mins… docker container replace is within 30 seconds.

I’m an Ex-PHP Developer… not used to ‘building’ lol

To be clear, now it builds docker images, compiles code, etc…

New territory. Guess I’m doing OK?

1 Like