TO-DO
This repository takes a Meteor bundle and makes it run in Docker with the use of the terrific & battle-tested Phusion Passenger Docker baseimage. It will create a production-ready Docker image with your Meteor app in it. The advantages of using the Phusion Passenger Docker image are numerous.
Why use passenger-docker instead of doing everything yourself in Dockerfile?
docker build, allowing you to iterate your Dockerfile more quickly.And for Meteor in specific:
docker run -d \
-e ROOT_URL=http://yourapp.com \
-e MONGO_URL=mongodb://url \
-e MONGO_OPLOG_URL=mongodb://oplog_url \
-v /dir_containing_bundledir:/home/app/webapp \
-p 80:80 \
joostlaan/meteor-docker-passenger
First step is always to put your Meteor bundle in the deploy directory. You could also download the zip for this repository from github and add the files to your Meteor project.
docker build -t myapp . &&
docker run -d \
-e ROOT_URL=http://yourapp.com \
-e MONGO_URL=mongodb://url \
-e MONGO_OPLOG_URL=mongodb://oplog_url \
-p 80:80 \
myapp
Run it local and see what's happening in the shell
docker build -t myapp . &&
docker run -i \
-e ROOT_URL=http://yourapp.com \
-e MONGO_URL=mongodb://url \
-e MONGO_OPLOG_URL=mongodb://oplog_url \
-p 80:80 \
myapp /sbin/my_init /bin/bash
docker build -t myapp . &&
docker run -i \
-e ROOT_URL=http://localhost \
-e MONGO_URL=mongodb://USER:[email protected]:PORT,whitney.1.mongolayer.com:PORT/DBNAME \
-e MONGO_OPLOG_URL=mongodb://USER:[email protected]:PORT,whitney.1.mongolayer.com:PORT/local?authSource=DBNAME \
-p 80:80 \
myapp /sbin/my_init /bin/bash
Tag the image, give it a version & push the image to the Tutum.co private Docker repository
docker tag myapp tutum.co/USERNAME/myappname:v1 &&
docker push tutum.co/USERNAME/myappname:v1
Add repo in Wercker Make a commit!
Build and test a Docker image. Remember to add the necessary -e environment variables.
rm -rf .deploy/bundle &&
meteor build --directory .deploy &&
sudo docker build -t myapp . &&
rm -rf .deploy/bundle &&
docker run -i -p 80:80 -t myapp /sbin/my_init /bin/bash
Content type
Image
Digest
sha256:12ce28fbd…
Size
227.5 MB
Last updated
almost 11 years ago
docker pull joostlaan/meteor-docker-passenger