Package Meteor for production installation on an offline server

I’m building an app for a customer that will run on a server that has no access to the internet.
As far as I know, the default mechanism for building and deploying a meteor app is to build it, then npm install on the programs/server folder to download dependencies, but this cannot happen at the target server.
I thought about creating a “build environment” that is similar to the target server, perform the above tasks, then package the entire bundle folder, and ship it to the destination. But I have to ask: isn’t there another way (hopefuly that looks more “proper” than this one)?

Any help appreciated here!

IIRC building bundles up all dependencies, including node_modules, the last npm install is to compile and verify fibers and other native modules for the target platform. I suspect it might work without an internet connection.

Though if you build, then run npm install on a similar box (same OS, same node version) before zipping up and copying onto the target server it should be fine

We used to do our deploys including the node_modules folder for kiosks that only had 3G internet access to avoid having to run npm install

1 Like

For the moment I’m using a docker container that represents the same environment as the target where the app will be installed, meteor build there, then npm install inside of bundle/programs/server, zip it all, and ship to the destination. It worked, I’m glad, but it feels a rather manual process… maybe it’s just lack of experience there, but I would like to have something more automated for packing the app for delivery.