Skip to content

Setting up a development environment

Sven Gehring edited this page Oct 12, 2016 · 49 revisions

Step 1: Get Docker & Friends

OSX / Windows

If you are on Mac, check out Docker for Mac
If you are on Windows, check out Docker for Windows

These will install docker, docker-compose, and docker-machine on your machine.

Linux

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

Step 2: Get your Hummingbird

Clone the Hummingbird repository from GitHub from [email protected]:hummingbird-me/hummingbird.git

Make sure to navigate to the repository directory cd hummingbird

Step 3: Build and get it up in the air

In order to pull, build and run, just run bin/setup and follow the instructions

If you get the following error message:

ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.

You should confirm that you've ran 'Docker Quickstart Terminal' and if so - attempt the command again in a new terminal window.

Step 4: Test if it's flying

Find the address and port for the application and open it in your browser. You can do this running bin/open or manually

  • On Linux with local docker: xdg-open "http://localhost:3000"
  • OSX / Windows with Docker Toolbox/Machine: open "http://$(docker-machine ip default):${$(docker-compose port nginx 80)//0[.:]/}"
  • OSX / Windows with Docker for Mac/Windows: open "http://localhost:${$(docker-compose port nginx 80)//0[.:]/}"

If the dependencies change you will need to rebuild the container with ./bin/rebuild [container], but otherwise your changes should propagate instantly. If you find that changes aren't propagating, try an rsync-based solution such as Dinghy (OS X)

=====

ProTips

* Make sure to keep the `$ docker-compose up web` running
  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