Fix mock data usage with 'make run-docker'

docker target doesn't work with file:// based ALERTMANAGER_URI since it doesn't have same paths inside the image, fix it by mapping a volume
This commit is contained in:
Łukasz Mierzwa
2017-04-22 22:33:12 -07:00
parent 79cee7474c
commit bfbba7ecb6

View File

@@ -2,7 +2,8 @@ NAME := unsee
VERSION := $(shell git describe --tags --always --dirty='-dev')
# Alertmanager instance used when running locally, points to mock data
ALERTMANAGER_URI := file://$(CURDIR)/mock/0.5
MOCK_PATH := $(CURDIR)/mock/0.5
ALERTMANAGER_URI := file://$(MOCK_PATH)
# Listen port when running locally
PORT := 8080
@@ -62,6 +63,7 @@ run-docker: docker-image
docker run \
--name $(NAME) \
$(DOCKER_ARGS) \
-v $(MOCK_PATH):$(MOCK_PATH) \
-e ALERTMANAGER_URI=$(ALERTMANAGER_URI) \
-e COLOR_LABELS_UNIQUE="instance cluster" \
-e COLOR_LABELS_STATIC="job" \