Skip to content

Up and Running with Docker

Johny Georges edited this page Mar 18, 2018 · 4 revisions

Before we start

Let's verify that you have docker and docker-compose installed.

docker -v
# Docker version <version number>, build <commit hash>

docker-compose -v
# docker-compose version <version number>, build <commit hash>

Setup

Clone the repo

git clone https://github.com/JetJet13/mathbook.git

The next thing we want to do is create a config file for your local environment that is tailored to your setup. There is a wiki page to help you get your local config file setup.

If you want your local setup to have authentication functionality, then you will need to provide a clientId, and a clientSecret. The values for those 2 properties will come from the OAuth Application that you will need to create on GitHub. You can find out how to do that here.

Important Note The docker image that we will be building using docker-compose will use all the values you set in your local.json except for host and port because those values will be overridden when we startup our docker services.

Getting it Running

Now, all that you need to do to get Mathbook up and running is the following,

docker-compose build

# once building completes
docker-compose up

# or if want to keep using your terminal
docker-compose up -d

We can verify that everything worked by visiting http://localhost:4001 in our favorite browser.

Clone this wiki locally