Add Makefile
This commit is contained in:
parent
55632a4c94
commit
f0df9fae5d
@ -1,3 +1,4 @@
|
|||||||
dist/
|
dist/
|
||||||
README.md
|
README.md
|
||||||
|
Makefile
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
|||||||
@ -19,3 +19,6 @@ indent_size = 2
|
|||||||
|
|
||||||
[docker-compose.yml]
|
[docker-compose.yml]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
|||||||
33
Makefile
Normal file
33
Makefile
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
DOCKER_REPOSITORY := daniel-website/nginx
|
||||||
|
DOCKER_TAG?="dev"
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help:
|
||||||
|
@printf "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m\n"
|
||||||
|
@grep -E '^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run: ## Start all docker containers using docker-compose
|
||||||
|
@docker-compose up -d
|
||||||
|
|
||||||
|
.PHONY: debug
|
||||||
|
debug: ## Start all docker containers using docker-compose. Attach to stdout
|
||||||
|
@docker-compose up
|
||||||
|
|
||||||
|
.PHONY: sh
|
||||||
|
sh: ## Start shell in docker container
|
||||||
|
@docker-compose exec vue bash
|
||||||
|
|
||||||
|
.PHONY: build-container
|
||||||
|
build-container: ## Build a release container
|
||||||
|
@docker build -t "${DOCKER_REPOSITORY}:${DOCKER_TAG}" -f docker/nginx/Dockerfile .
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build: node_modules ## Build a release
|
||||||
|
@yarn build
|
||||||
|
|
||||||
|
node_modules: package.json yarn.lock
|
||||||
|
@yarn
|
||||||
|
@touch node_modules
|
||||||
Loading…
Reference in New Issue
Block a user