forked from alerta/docker-alerta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 895 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
37
38
39
40
41
VCS_REF=$(shell git rev-parse --short HEAD)
BUILD_DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
VERSION:=$(shell cat VERSION)
.PHONY: version
all: help
help:
@echo ""
@echo "Usage: make <command>"
@echo "Commands:"
@echo " build Build container"
@echo " pull Pull latest containers"
@echo " up Create and start containers"
@echo " down Stop and remove containers"
@echo " clean Remove stopped containers"
@echo " version Show docker and alerta versions "
@echo ""
build:
docker-compose -f docker-compose.yml build \
--build-arg VCS_REF=$(VCS_REF) \
--build-arg VERSION=$(VERSION)
pull:
docker-compose -f docker-compose.yml pull
up:
docker-compose -f docker-compose.yml up
down:
docker-compose -f docker-compose.yml down
clean:
docker-compose -f docker-compose.yml rm
version:
@docker-compose version
@echo "alerta version $(VERSION)"