Skip to content

Commit

Permalink
Add documentation on Docker
Browse files Browse the repository at this point in the history
As we'd like to support Docker, we're providing documentation on why and
when would an individual use it, as well as how to get around doing so.
  • Loading branch information
paroxp committed Nov 22, 2018
1 parent 5a3e927 commit dd84a24
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions docs/documentation/install/developer-install-instructions.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,57 @@
# Instructions for developers

There are multiple ways of running the application locally.

## Native

It's built on the [Express](http://expressjs.com/) framework, and uses [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend).

## Requirements
### Requirements

node.js - version 8.x.x

## Install dependencies
### Install dependencies

```
npm install
```

## Run the kit
### Run the kit
```
npm start
```

Go to [localhost:3000](http://localhost:3000) in your browser.

## Docker

You may choose to run the application in the docker environment. Doing so you'd
probably be driven by some of the following:

- avoid installing/managing node on your machine
- avoid remembering to install/compile dependencies
- running application in an artifact way
- ability to push to Kubernetes (RE Build & Run) or CloudFoundry (GOV.UK PaaS)
- run in _production-like_ environment

We've placed a `Dockerfile` in the root of the project.

You can build an image by running the following:

```
docker build . -t govuk-prototype-kit:latest
```

This step will pull a small image containing a base operating system with node
pre-installed. Additionally, will mount your current working directory along
with installing some `node_modules`.

You can run it afterwards with:

```
docker run -p 3000:3000 govuk-prototype-kit:latest
```

The application will listen on your exposed port (`3000` in this case). You
should be able to visit http://localhost:3000/

0 comments on commit dd84a24

Please sign in to comment.