Skip to content

Setting up a development environment

Goh'Dan edited this page Oct 20, 2015 · 49 revisions

Step 1: Get Docker & Friends

OSX

Install docker, docker-compose, and docker-machine. You can use this script to do that automatically:

curl -sL https://gist.githubusercontent.com/MiLk/f08cc6b5ded20ef46c5b/raw/d44a35a3e07372118584d3bdaf2d5620e6b245c8/install.sh | sh
echo 'eval "$(docker-machine env docker-machine-dev)"' >> ~/.bashrc`

Windows

Install Docker, Docker Compose, and Docker Machine using the instructions on their website.

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:$(docker-compose port web 3000 | cut -d':' -f2)"
  • On OSX with docker machine:

    $ open "http://$(docker-machine ip docker-machine-dev):$(docker-compose port web 3000 | cut -d':' -f2)"
  • 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