Install Docker on your system.
- Install instructions for Mac OS X
Install Docker Compose on your system.
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Run npm install
in node folder
Run docker-compose build
. It will
- install nodemon globally in your container
- instruct the container to execute
nodemon index.js
on start up.
Run docker-compose up
to
- create postgres container
- create elastic search container
- create 2 node app containers link to postgres and elastic search
- create a nginx container and proxy to 2 node app containers
The app should then be running on your docker daemon on port 80 (On OS X you can use
boot2docker ip
to find out the IP address).
Run boot2docker ip
to get boot2docker host
psql -h [boot2docker host] -U youruser
Run docker-compose rm
redis