From d9e3246c27b9424a97d1f67bc3e8863ec89b2ca7 Mon Sep 17 00:00:00 2001 From: Nick Sellen Date: Fri, 30 Nov 2018 11:45:48 +0000 Subject: [PATCH] Put it in a docker --- .gitignore | 3 ++- README.md | 11 +++++++++++ _config.yml | 5 ++++- dev | 12 ++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 dev diff --git a/.gitignore b/.gitignore index 03b847a..0f70f37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ _site - \ No newline at end of file +.idea +vendor diff --git a/README.md b/README.md index 8c482ff..335db97 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,17 @@ This is a port of the current Wordpress version of the [CoTech Website][] to a s You can run the site on your computer as if it were live online using Jekyll. You will need `git` and `ruby` installed on your machine to do this. Then clone the repository git clone git@git.coop:cotech/website.git + +### ... using docker + +Make sure you have [docker](https://docs.docker.com/install/) (CE is fine) installed and running, then: + + cd website + ./dev + +And visit [localhost:4000](http://localhost:4000) to view the site. + +### ... directly on your machine Install the dependencies for the project diff --git a/_config.yml b/_config.yml index c96fd67..b52c7c3 100644 --- a/_config.yml +++ b/_config.yml @@ -1,7 +1,10 @@ --- title: Cotech Website timezone: UTC -exclude: ['scripts'] +exclude: +- scripts +- vendor +- .idea collections: clients: title: Clients diff --git a/dev b/dev new file mode 100755 index 0000000..736115f --- /dev/null +++ b/dev @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eu + +docker run --rm -it \ + -v $(pwd):/src \ + -p 4000:4000 \ + ruby:2.5.3 sh -c ' + cd /src && + bundle --path vendor && + bundle exec jekyll serve --host 0.0.0.0 --port 4000 + '