##SIZE matters when you pay for Meteor deployment
This EXPERIMENTAL deployment container is:
- ultra-lightweight in image size (ONLY 28 MB!! Not a typo.)
- flexible - works well with Docker linking
- tested to work in Kubernetes orchestrations
Container size is very important if you pay for deployments.
Larger image size means:
- more time wasted waiting for every push and pull
- paying more for transfer, storage, and RAM
With this container, the final image size for typical applications is around 35MB. Other containers may create image size of up to 800MB for the same application. YOU DO THE MATH!!
If you need something more conventional and is still slimmer than most, try the original meteor slim image.
Get the image
docker pull singli/meteorslim
What you need to use this image
- be on 64bit x86 Linux
- not have any mobile platforms added to your project (removing them is okay)
How to build a deployable image for your app
Your app will be converted into a Docker image. Then you can deploy the image with any container hosting service(s).
Dockerfile into the root of your app:
FROM singli/meteorslim MAINTAINER Your Name ENV ROOT_URL http://yourapp.com
In your app directory, add a
set_env.sh file and set all the environment variables that you need (or for Docker container linking).
set_env.sh will be parsed at runtime - just before startup of
the meteor app.
From your app directory, do the following:
mkdir app meteor build --directory app
Back at the app directory, you can build the docker image with:
docker build -t yourname/app .
Then you can run your meteor image with
docker run -d \ -p 8099:80 \ yourname/app
Then you can access your app at port 8099 of the host system.