add make targets for local docker testing

This commit is contained in:
Lexi / Zoe 2019-10-19 02:31:22 +02:00
parent 2ed750537d
commit b76a488537
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 9 additions and 1 deletions

View File

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