Add make stop and allow --incremental

[ci skip]
This commit is contained in:
Luke Murphy
2020-04-18 19:44:48 +02:00
parent 8463aa2342
commit 9f1dd6284b
3 changed files with 37 additions and 16 deletions

View File

@ -1,14 +1,26 @@
dockerbuild:
@docker build -t autonomic/autonomic.zone:testing .
.PHONY: dockerbuild
IMG := autonomic/autonomic.zone
NAME := autonomic-zone-testing
PORT := 4000
TAG := testing
dockerserver: dockerbuild
build:
@docker build -t $(IMG):$(TAG) .
.PHONY: build
stop:
@docker stop $(NAME) && docker rm $(NAME) --force
.PHONY: stop
serve: build
@docker run \
-e JEKYLL_PORT=4000 \
--name $(NAME) \
-e JEKYLL_PORT=$(PORT) \
-e JEKYLL_HOST=0.0.0.0 \
-e JEKYLL_CONFIG=_config_dev.yml \
-e JEKYLL_ENV=development \
-v $$(pwd):/usr/src/app \
-p 4000:4000 \
-p $(PORT):$(PORT) \
-d \
autonomic/autonomic.zone:testing
.PHONY: dockerserver
$(IMG):$(TAG) && \
echo "Site available at http://localhost:4000"
.PHONY: serve