Run meteor app with hipache frontend and mongodb backend. All conponents are in their docker containers. Note multiple meteor servers behind hipache!
- Install vagrant, see here: http://docs.vagrantup.com/v2/installation/
- Create ubuntu 12.04 virtual machine with docker pre-installed: run
vagrant up
- Reload virtual machine:
vagrant reload
- Login into virtual machine:
vagrant ssh
- Update packages:
sudo apt-get -y update
- Install some useful packages:
sudo apt-get -y install curl git redis-server mongodb-clients vim
- Install meteor:
curl https://install.meteor.com | sh
- Go to shared directory:
cd /vagrant
, this directory is shared between MacOS and ubuntu - Go to docker files directory:
cd docker
- Build docker images:
./buildimages.sh
- Check if all three images (test/hipache, test/mongodb, test/meteor) are generated:
sudo docker images
- Create a directory out of the /vagrant tree, i.e.:
sudo mkdir /data; sudo chown vagrant.vagrant /data
- Create subdirectories:
mkdir /data/files; mkdir /data/db; mkdir /data/db/testdb
- To init a file for database volume and mount it on /data/db/testdb run this script:
./builddbvolume.sh
- Edit /etc/hosts both on MacOS and ubuntu, add the following entry:
127.0.0.1 test.local
- Go to
/vagrant/docker
- Run
./run.sh
- Point your browser to http://test.local:8000 (on MacOS) or http://test.local (on ubuntu)