0
votes

A Meteor app needs to run in a docker container, when unzipping the myApp.tar.gz which is produced by myApp$ meteor build ., there exists a bundle/README file with the following contents:

This is a Meteor application bundle. It has only one external dependency: Node.js 4.4.7 or newer. To run the application:

$ (cd programs/server && npm install)
$ export MONGO_URL='mongodb://user:password@host:port/databasename'
$ export ROOT_URL='http://example.com'
$ export MAIL_URL='smtp://user:password@mailhost:port/'
$ node main.js

Does that mean that no need to have the following line in a Dockerfile?
RUN npm install fibers underscore source-map-support semver
And all what is needed in a Dockerfile is:

FROM lambdalinux/baseimage-amzn:2016.09-000
COPY ./bundle /opt/
WORKDIR /opt/bundle/programs/server/
RUN npm install
VOLUME ./bundle:/opt/bundle
CMD node ./main.js

And if any of the contents of the /bundle changes, that will automatically apply to the running app on the browser?

1

1 Answers

0
votes

If you put a new bundle up, you will need to go through the same process again. Unlike the development environment there is no live update.

It's good practice to unpack a new version into a different location, symlink in the new directory, and then restart the proxy and server processes.

Keeping the previous version, allows you to revert to the previous version very easily if things don't work out