my tools for viewing covid data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

65 lines
1.3 KiB

INFLUX_DATA_PATH := ${CURDIR}/testdata/influx
GRAFANA_DATA_PATH := ${CURDIR}/testdata/grafana
VENV := testenv
INFLUX := http://localhost:10019/covid
.PHONY: local-venv-setup
local-venv-setup:
virtualenv -p python3 $(VENV)
./$(VENV)/bin/python3 -m pip install -r requirements.txt
.PHONY: local-venv-wipe
local-venv-wipe:
rm -rf $(VENV)
.PHONY: run-local-influx
run-local-influx:
-docker rm covid-influx
mkdir -p $(INFLUX_DATA_PATH)
docker run -d --name covid-influx -p 10019:8086 -v ${INFLUX_DATA_PATH}:/var/lib/influxdb influxdb:1.7
echo "http://localhost:10019"
.PHONY: stop-local-influx
stop-local-influx:
-docker stop covid-influx
.PHONY: wipe-local-influx
wipe-local-influx:
-rm -rf $(INFLUX_DATA_PATH)
.PHONY: local-influx-cli
local-influx-cli:
docker exec -it covid-influx influx
.PHONY: run-local-grafana
run-local-grafana:
-docker rm covid-grafana
mkdir -p $(GRAFANA_DATA_PATH)
docker run -d --name covid-grafana --link covid-influx:influx -p 10020:3000 -v ${GRAFANA_DATA_PATH}:/var/lib/grafana grafana/grafana
echo "http://localhost:10020"
.PHONY: stop-local-grafana
stop-local-grafana:
-docker stop covid-grafana
.PHONY: wipe-local-grafana
wipe-local-grafana:
-rm -rf $(GRAFANA_DATA_PATH)
.PHONY: ingest
ingest:
python3 ingest3.py
.PHONY: pull
pull:
cd COVID-19/; git pull