Updated Makefile with help command
This commit is contained in:
18
Makefile
18
Makefile
@@ -1,5 +1,6 @@
|
||||
#!make
|
||||
SHELL := /bin/bash
|
||||
|
||||
include .env
|
||||
include .version
|
||||
export $(shell sed 's/=.*//' .env)
|
||||
@@ -9,20 +10,25 @@ SIREN_IMAGES = $(shell docker images 'siren' -a -q)
|
||||
|
||||
.PHONY: help build test up down exec clean
|
||||
|
||||
build:
|
||||
help: ## Help command
|
||||
@echo
|
||||
@cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
@echo
|
||||
|
||||
build: ## Build the docker image
|
||||
docker build -t siren:${SIREN_VERSION} .
|
||||
|
||||
test:
|
||||
test: ## Run the docker app as a container
|
||||
docker run --env-file .env -it --rm --name siren siren:${SIREN_VERSION}
|
||||
|
||||
up:
|
||||
up: ## Start the app
|
||||
docker compose up -d
|
||||
|
||||
down:
|
||||
down: ## Stop the app
|
||||
docker compose down
|
||||
|
||||
exec:
|
||||
exec: ## Enter running docker container
|
||||
docker exec -it siren bash
|
||||
|
||||
clean:
|
||||
clean: ## Cleanup docker images
|
||||
docker rmi $(SIREN_IMAGES)
|
||||
|
||||
Reference in New Issue
Block a user