Skip to content

vlebedev/docker-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-test

Run meteor app with hipache frontend and mongodb backend. All conponents are in their docker containers. Note multiple meteor servers behind hipache!

MacOS X vagrant setup (skip if you are already on Linux)

  1. Install vagrant, see here: http://docs.vagrantup.com/v2/installation/
  2. Create ubuntu 12.04 virtual machine with docker pre-installed: run vagrant up
  3. Reload virtual machine: vagrant reload
  4. Login into virtual machine: vagrant ssh

Get some packages for ubuntu

  1. Update packages: sudo apt-get -y update
  2. Install some useful packages: sudo apt-get -y install curl git redis-server mongodb-clients vim
  3. Install meteor: curl https://install.meteor.com | sh

Build docker images

  1. Go to shared directory: cd /vagrant, this directory is shared between MacOS and ubuntu
  2. Go to docker files directory: cd docker
  3. Build docker images: ./buildimages.sh
  4. Check if all three images (test/hipache, test/mongodb, test/meteor) are generated: sudo docker images

Build and mount mongodb data file

  1. Create a directory out of the /vagrant tree, i.e.: sudo mkdir /data; sudo chown vagrant.vagrant /data
  2. Create subdirectories: mkdir /data/files; mkdir /data/db; mkdir /data/db/testdb
  3. To init a file for database volume and mount it on /data/db/testdb run this script: ./builddbvolume.sh

Edit /etc/hosts

  1. Edit /etc/hosts both on MacOS and ubuntu, add the following entry: 127.0.0.1 test.local

Run containers

  1. Go to /vagrant/docker
  2. Run ./run.sh
  3. Point your browser to http://test.local:8000 (on MacOS) or http://test.local (on ubuntu)

About

Playing around with docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published