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 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