From 030c3fc9796ce25043f921cfa67d15dee359aff1 Mon Sep 17 00:00:00 2001 From: Jon Brouse Date: Tue, 14 Jan 2020 15:05:18 -0500 Subject: [PATCH 1/2] Updated makefile to run Jekyll in Docker --- Makefile | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 25b552b..2ebab5b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build help serve +.PHONY: build rebuild remove stop up help HOST ?= "0.0.0.0" PORT ?= "4000" @@ -8,14 +8,49 @@ PORT ?= "4000" help: @echo "Make Help" @echo "" - @echo "make build - build static files" - @echo "make serve - run development server" + @echo " make build - builds Jekyll image" + @echo " make rebuild - rebuilds Jekyll image and starts container" + @echo " make remove - stops and removes container" + @echo " make stop - stops running container" + @echo " make up - starts container and serves site on localhost:4000" -serve: +serve-local: @bundle exec jekyll serve --host=${HOST} ${PORT} -build: +build-local: @echo "" @echo "" @echo "Building project..." @bundle exec jekyll build + +build: + @echo "" + @echo "" + @docker-compose build + +rebuild: + @echo "" + @echo "" + @echo "Rebuilding container..." + @make remove + @make build + @make up + +remove: + @echo "" + @echo "" + @echo "Removing container..." + @make stop + @docker-compose rm -f + +stop: + @echo "" + @echo "" + @echo "Stopping container..." + @docker-compose stop + +up: + @echo "" + @echo "" + @echo "Starting project..." + @docker-compose up -d From 0bd6cb384e06e7459083f57064d337f277ed3c2a Mon Sep 17 00:00:00 2001 From: Jon Brouse Date: Tue, 14 Jan 2020 15:05:55 -0500 Subject: [PATCH 2/2] Removed Gemfile.lock from Dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2fdc308..f524987 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ FROM jekyll/builder WORKDIR /tmp ADD Gemfile /tmp/ -ADD Gemfile.lock /tmp/ RUN bundle install FROM jekyll/jekyll