Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Update README.md install instructions, add Docker support.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Jul 14, 2017
1 parent 9195787 commit e7e0f36
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
@@ -0,0 +1,9 @@
FROM ruby:2.3

# jekyll_pages_api_search needs Node, so we gotta install it.

# https://nodejs.org/en/download/package-manager/

RUN apt-get update && \
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs zip
29 changes: 27 additions & 2 deletions README.md
Expand Up @@ -26,17 +26,42 @@ We started by adapting [GOV.UK’s work](https://www.gov.uk/guidance/content-des

### Running the site

The 18F Content Guide runs on [Jekyll](http://jekyllrb.com/). To run it locally:
The 18F Content Guide runs on [Jekyll](http://jekyllrb.com/).

To run it locally:

1. Make sure that you have Ruby 2.3. At present, this project is incompatible with Ruby 2.4.
1. Clone the repository.
1. Get [Jekyll] and the necessary dependencies: `bundle install`
1. Get [Jekyll][] and the necessary dependencies: `bundle install`
1. Run the web server with `./go serve` (or `jekyll serve` if you have Jekyll installed globally)
1. Visit the local site at [http://localhost:4000](http://localhost:4000)

Note that you will also need [Node.js][] in order for the site's built-in
search functionality to work. If you don't have it, that's ok--the search
functionality won't work for you, though.

### Running the site with Docker

If you don't want to have to deal with making sure that you have the
proper version of Ruby and Node installed, you can use Docker instead. It
takes care of all the dependencies for you.

1. Install [Docker][].
1. Clone the repository.
1. Run `docker-compose up`.
1. Visit the local site at [http://localhost:4000](http://localhost:4000)

If you ever decide that you no longer want to use Docker, run
`docker-compose down -v` to properly clean everything up.

### Public domain

This project is in the worldwide [public domain](LICENSE.md).

> As a work of the United States government, this project is in the public domain within the United States.
> Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.
[Jekyll]: http://jekyllrb.com/
[Node.js]: https://nodejs.org/en/
[Docker]: https://www.docker.com/
16 changes: 16 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,16 @@
version: '2'
services:
app:
build: .
working_dir: /content-guide
command: bash -c 'bundle install && jekyll serve --force_polling -H 0.0.0.0 -P 4000'
stop_signal: SIGKILL
ports:
- 4000:4000
volumes:
- .:/content-guide
- root:/root/
- bundle:/usr/local/bundle/
volumes:
root:
bundle:

0 comments on commit e7e0f36

Please sign in to comment.