File tree Expand file tree Collapse file tree 3 files changed +50
-1
lines changed
Expand file tree Collapse file tree 3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ .PHONY : default
2+ default : help;
3+
4+ include .env
5+
6+ CARBON_PLAINTEXT_PORT :=2003
7+ STACK_SLUG := 'github-metrics'
8+
9+ help : # # Show this help
10+ @echo ' ----------------------------------------------------------------------'
11+ @echo $(STACK_SLUG )
12+ @echo ' ----------------------------------------------------------------------'
13+ @fgrep -h " ##" $(MAKEFILE_LIST ) | fgrep -v fgrep | sed -e ' s/\\$$//' | sed -e ' s/##//'
14+ @echo ' ----------------------------------------------------------------------'
15+
16+ test : # # Execute tests
17+ @npm test
18+
19+ run-collect :
20+ @docker run \
21+ --env GITHUB_TOKEN=${GITHUB_TOKEN} \
22+ --env DATABASE_PATH=${DATABASE_PATH} \
23+ --volume data:/opt/github-metrics/data \
24+ --name $(STACK_SLUG ) -app \
25+ ${STACK_SLUG} -app npm start collect ${OWNER} ${REPO}
26+
27+ build-collect :
28+ @docker build . \
29+ --file Dockerfile \
30+ --tag ${STACK_SLUG} -app
31+
32+ run-graphite : # # Builds and runs a graphite container
33+ @docker run -d \
34+ --name $(STACK_SLUG ) -graphite \
35+ --restart=always\
36+ -p 80:80\
37+ -p $(CARBON_PLAINTEXT_PORT ) -2004:$(CARBON_PLAINTEXT_PORT ) -2004\
38+ -p 2023-2024:2023-2024\
39+ -p 8125:8125/udp\
40+ -p 8126:8126\
41+ graphiteapp/graphite-statsd
Original file line number Diff line number Diff line change 6767
6868$ docker-compose up
6969```
70+
71+ ### Docker
72+
73+ ``` sh
74+ # Collector
75+ $ make build-collect
76+ $ make run-collect OWNER=facebook REPO=react
77+ ```
Original file line number Diff line number Diff line change 11{
2- "name" : " github-metrics-graphite-exporter " ,
2+ "name" : " github-metrics" ,
33 "version" : " 1.0.0" ,
44 "description" : " [](https://travis-ci.org/matchilling/github-metrics-graphite-exporter)" ,
55 "main" : " src/cli.js" ,
You can’t perform that action at this time.
0 commit comments