From b76a48853752983138ca30d73e3be339597716a6 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Sat, 19 Oct 2019 02:31:22 +0200 Subject: [PATCH] add make targets for local docker testing --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e95c766..5426755 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ STAGE ?= production GIT_CRYPT_KEY ?= ~/.git-crypt-keys/$(APP_NAME)-$(STAGE).key DOCKER_COMPOSE_YML := .deployment/$(STAGE)/docker-compose.yml -.PHONY: run decrypt deploy-production +.PHONY: run docker-build docker-run decrypt deploy log-show # Default target: none all: @@ -22,6 +22,14 @@ all: run: $(PYTHON) manage.py runserver $(SERVER_LISTEN) +# Build docker image (without docker-compose) +docker-build: + docker build -t $(APP_NAME):latest . + +# Run docker image (without docker-compose) +docker-run: + docker run --rm -ti -p 8042:8042 $(APP_NAME):latest + ### Deployment