-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 676 Bytes
/
Makefile
File metadata and controls
24 lines (18 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# always latest with no arguments
VERSION=latest
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@echo ''
@echo 'make build # will use $(VERSION) as tag'
@echo 'make build VERSION=$$(jq -rM '.version' package.json) # will use :latest as tag'
.DEFAULT_GOAL := help
start:
docker-compose up -d
build: ## Build the container
docker build -t app:latest .
run: ## run single container
docker run --name app -d -e PORT=4000 -p 4000:4000 app