Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Update makefile #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM jekyll/builder

WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install

FROM jekyll/jekyll
Expand Down
45 changes: 40 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build help serve
.PHONY: build rebuild remove stop up help

HOST ?= "0.0.0.0"
PORT ?= "4000"
Expand All @@ -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