UPD: everything is better now :)
This commit is contained in:
17
Makefile
17
Makefile
@@ -1,17 +1,28 @@
|
||||
APPLICATION_NAME := django-test
|
||||
IMAGE_NAME := heinzel/$(APPLICATION_NAME)
|
||||
REPO_URL := https://heinzelwelt.de/vcs/python/django-test
|
||||
REPO_DIR := src/$(APPLICATION_NAME)
|
||||
IMAGE_NAME := $(APPLICATION_NAME)
|
||||
|
||||
DOCKER := docker
|
||||
GIT := git
|
||||
|
||||
.PHONY: default help image run
|
||||
.PHONY: default help image test-run dist-clean
|
||||
|
||||
default: image
|
||||
|
||||
help:
|
||||
@echo "There is no help."
|
||||
|
||||
image:
|
||||
$(REPO_DIR):
|
||||
$(GIT) clone $(REPO_URL) $@
|
||||
|
||||
$(IMAGE_NAME): $(REPO_DIR)
|
||||
$(DOCKER) build -t $(IMAGE_NAME) .
|
||||
|
||||
image: $(IMAGE_NAME)
|
||||
|
||||
test-run:
|
||||
$(DOCKER) run -ti --rm -p 80:80 $(IMAGE_NAME)
|
||||
|
||||
dist-clean:
|
||||
-rm -rf $(REPO_DIR)
|
||||
|
||||
Reference in New Issue
Block a user