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.
 
 
 

66 lines
1.3 KiB

  1. INFLUX_DATA_PATH := ${CURDIR}/testdata/influx
  2. GRAFANA_DATA_PATH := ${CURDIR}/testdata/grafana
  3. VENV := testenv
  4. INFLUX := http://localhost:10019/covid
  5. .PHONY: local-venv-setup
  6. local-venv-setup:
  7. virtualenv -p python3 $(VENV)
  8. ./$(VENV)/bin/python3 -m pip install -r requirements.txt
  9. .PHONY: local-venv-wipe
  10. local-venv-wipe:
  11. rm -rf $(VENV)
  12. .PHONY: run-local-influx
  13. run-local-influx:
  14. -docker rm covid-influx
  15. mkdir -p $(INFLUX_DATA_PATH)
  16. docker run -d --name covid-influx -p 10019:8086 -v ${INFLUX_DATA_PATH}:/var/lib/influxdb influxdb:1.7
  17. echo "http://localhost:10019"
  18. .PHONY: stop-local-influx
  19. stop-local-influx:
  20. -docker stop covid-influx
  21. .PHONY: wipe-local-influx
  22. wipe-local-influx:
  23. -rm -rf $(INFLUX_DATA_PATH)
  24. .PHONY: local-influx-cli
  25. local-influx-cli:
  26. docker exec -it covid-influx influx
  27. .PHONY: run-local-grafana
  28. run-local-grafana:
  29. -docker rm covid-grafana
  30. mkdir -p $(GRAFANA_DATA_PATH)
  31. docker run -d --name covid-grafana --link covid-influx:influx -p 10020:3000 -v ${GRAFANA_DATA_PATH}:/var/lib/grafana grafana/grafana
  32. echo "http://localhost:10020"
  33. .PHONY: stop-local-grafana
  34. stop-local-grafana:
  35. -docker stop covid-grafana
  36. .PHONY: wipe-local-grafana
  37. wipe-local-grafana:
  38. -rm -rf $(GRAFANA_DATA_PATH)
  39. .PHONY: ingest
  40. ingest:
  41. python3 ingest3.py
  42. .PHONY: pull
  43. pull:
  44. cd COVID-19/; git pull