Meteor app deployment from repo


#1

We would like to deploy our app using this method: point to a git repo and Open Shift will fetch, build, and deploy. We used “meteor build” (with appropriate options) to make a node.js bundle, and then we made a git repo with this bundle and pointed Open Shift to it -> build fails. Does anyone know anything about this, I am basically one of the developers of the app, but I have no experience to deployment, especially using the technologies mentioned. We are also going to try using Docker, on which we can create an image with the required dependencies, but I am not sure this is the most logical solution.

Thanks
K.


#2

After meteor build, you have some intermediate build steps.

Also, if you are building under one architecture, and deploying to a different architecture, it will possibly cause issues (e.g. Build on Linux, and deploy to Windows).

But after the meteor build step, you need to run npm install from the bundle/programs/server/ folder, then rune the node command.

Not sure you are doing all that or not, but it is all important.


#3

What exactly do you mean by build fails?

What steps is OpenShift attempting? and what error is it giving?


#4

Hi I am coming back to this, after a little while, we realised there is a problem with Docker and linux server architecture. So now we are looking to alternative ways to deploy the app, what is the easiest way for deployment since we are not very familiar with this process we would appreciate the most straight forward implementation. For example, is Galaxy okay to look into? AFAIK it costs little and is very effective for Meteor integration.

K


#5

we managed to deploy to kubernetes using this dockerfile, this might also work on other systems as well:

FROM node:${nodeVersion}
ADD bundle /app
RUN cd /app/programs/server && npm install
WORKDIR /app
EXPOSE 8888
CMD ["node", "main.js"]

this file should be next to the unpacked build folder, which you create with

meteor build --server xxx --architecture os.linux.x86_64 --directory /path/to/

so /path/to/ should contain the dockerfile and a foder /bundle.

the nodeVersion can be fixed, or you read the recommended version from the meteor bundle:

cat /path/to/bundle/.node_version.txt

This does not contain a mongodb as we run that separatly.