Skip to content

Setting up a development environment

Josh Fabian edited this page Dec 16, 2015 · 49 revisions

Step 1: Get Docker & Friends

OSX / Windows

Install Docker Toolbox which contains docker, docker-compose, and docker-machine.

After Docker Toolbox is installed, run the program 'Docker Quickstart Terminal' to set-up your docker machine.

Linux

Use your distribution's package manager to install docker and docker-compose.

Step 2: Build the containers

Go to cloned hummingbird repository

$ cd hummingbird
$ docker-compose build

Step 3: Start the application

$ docker-compose up web

Step 4: Test it

  1. Find the port for the application:
  • On Linux with local Docker:

    xdg-open "http://localhost:3000"
  • On OSX with docker machine:

    $ open "http://$(docker-machine ip docker-machine-dev):3000"
  • As a side note you may replace the "open" with "echo" if you want it to just output it into your terminal so you can copy and paste it directly into your web browser

If the dependencies change you will need to re-build the container, but otherwise your changes should propagate instantly.

ProTips

* Make sure to keep the `$ docker-compose up web` running
* You will have to keep refreshing the page until all the data loads (when the page is done loading, refresh, and repeat until it loads. Just so you know this could take 1-2 hours)
* There is a good chance hummingbird won't even load and this is *most* likely not your fault and has to do with how hummingbird was coded (we are currently fixing this issue)
* Jump to "General Instructions" which will explain how to pull hummingbird from github (and all the extra fun stuff you need to do)
  1. Debugging (read this if you have any errors or just want to check everything installed correctly)

    • Type this in terminal:
    echo $DOCKER_HOST

    The output should be something like this: tcp://192.168.99.100:2376 (yours might be diffrent numbers)

    • Type this in terminal next:
    echo $SHELL

    The output should say: /bin/bash

    • Lastly type this:
    docker-machine ls

    The output should look something like this:

    NAME ACTIVE DRIVER STATE URL SWARM

    docker-machine-dev virtualbox Running tcp://192.168.99.100:2376

    • What is important is that your name is the same (and there might be a little '.' to show its active)
Clone this wiki locally