-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
36 lines (31 loc) · 810 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.SILENT :
# App name
APPNAME:=node-red-contrib-openid
## This help screen
help:
printf "Available targets:\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf "%-15s %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.PHONY : help
## Create Docker image
image:
echo ">> Building Docker image..."
docker build --rm -t ncarlier/$(APPNAME) .
.PHONY: image
## Deploy Docker compose stack
deploy:
echo ">> Deploy Docker Compose stack..."
docker compose up
.PHONY: deploy
## Un-deploy Docker compose stack
undeploy:
echo ">> Un-deploy Docker Compose stack..."
docker compose down
.PHONY: undeploy