2021-03-12 07:53:17 -06:00
|
|
|
.PHONY: pull docs docs-quick docs-no-pull docs-test docs-local-static
|
2019-12-18 06:26:47 -06:00
|
|
|
|
2020-10-30 04:22:01 -05:00
|
|
|
IMAGE = grafana/grafana-docs-dev:latest
|
2021-04-12 02:42:10 -05:00
|
|
|
CONTENT_PATH = /hugo/content/docs/grafana/next
|
2021-01-21 06:27:54 -06:00
|
|
|
LOCAL_STATIC_PATH = ../../website/static
|
2021-02-04 11:54:48 -06:00
|
|
|
PORT = 3002:3002
|
2020-01-14 09:26:00 -06:00
|
|
|
|
2021-03-12 07:53:17 -06:00
|
|
|
pull:
|
2020-10-22 02:57:56 -05:00
|
|
|
docker pull $(IMAGE)
|
2021-03-12 07:53:17 -06:00
|
|
|
|
|
|
|
docs: pull
|
2021-04-16 10:29:06 -05:00
|
|
|
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server"
|
2020-11-09 14:26:49 -06:00
|
|
|
|
2021-03-12 07:53:17 -06:00
|
|
|
docs-quick: pull
|
2022-09-01 11:15:44 -05:00
|
|
|
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server-quick"
|
2021-03-12 07:53:17 -06:00
|
|
|
|
2020-10-30 04:22:01 -05:00
|
|
|
docs-no-pull:
|
2021-06-01 23:36:47 -05:00
|
|
|
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server"
|
2020-10-22 02:57:56 -05:00
|
|
|
|
2021-03-12 07:53:17 -06:00
|
|
|
docs-test: pull
|
2021-02-04 11:54:48 -06:00
|
|
|
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) /bin/bash -c 'make prod'
|
2021-01-21 06:27:54 -06:00
|
|
|
|
|
|
|
# expects that you have grafana/website checked out in same path as the grafana repo.
|
2021-03-12 07:53:17 -06:00
|
|
|
docs-local-static: pull
|
2021-01-21 06:27:54 -06:00
|
|
|
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
|
2021-02-04 11:54:48 -06:00
|
|
|
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
|
|
|
|
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
|