-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from twstokes/develop
Docker goodies
- Loading branch information
Showing
12 changed files
with
308 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data | ||
docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,5 @@ ENV/ | |
data/ | ||
.DS_Store | ||
config.yml | ||
|
||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM python:3 | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt /app | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY healthdata_influx /app | ||
|
||
CMD [ "python3", "import.py", "/data/export.xml" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3' | ||
|
||
services: | ||
importer: | ||
build: . | ||
links: | ||
- influxdb | ||
volumes: | ||
- ./data:/data:ro | ||
- ./docker-compose/config.yml:/app/config.yml:ro | ||
|
||
influxdb: | ||
image: influxdb | ||
env_file: | ||
- './docker-compose/env.influxdb' | ||
|
||
grafana: | ||
image: grafana/grafana:latest | ||
volumes: | ||
- ./docker-compose/grafana_datasources:/etc/grafana/provisioning/datasources | ||
- ./docker-compose/grafana_dashboard_providers:/etc/grafana/provisioning/dashboards | ||
- ./docker-compose/grafana_dashboards:/var/lib/grafana/dashboards | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- './docker-compose/env.grafana' | ||
links: | ||
- influxdb |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: 'default' | ||
orgId: 1 | ||
folder: '' | ||
type: file | ||
disableDeletion: false | ||
updateIntervalSeconds: 3 #how often Grafana will scan for changed dashboards | ||
options: | ||
path: /var/lib/grafana/dashboards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": "-- Grafana --", | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"editable": true, | ||
"gnetId": null, | ||
"graphTooltip": 0, | ||
"id": 1, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"aliasColors": {}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"datasource": "InfluxDB", | ||
"fill": 1, | ||
"gridPos": { | ||
"h": 10, | ||
"w": 24, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"legend": { | ||
"avg": false, | ||
"current": false, | ||
"max": false, | ||
"min": false, | ||
"show": true, | ||
"total": false, | ||
"values": false | ||
}, | ||
"lines": true, | ||
"linewidth": 1, | ||
"links": [], | ||
"nullPointMode": "null", | ||
"percentage": false, | ||
"pointradius": 5, | ||
"points": false, | ||
"renderer": "flot", | ||
"seriesOverrides": [], | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"targets": [ | ||
{ | ||
"$$hashKey": "object:172", | ||
"groupBy": [ | ||
{ | ||
"params": [ | ||
"24h" | ||
], | ||
"type": "time" | ||
}, | ||
{ | ||
"params": [ | ||
"null" | ||
], | ||
"type": "fill" | ||
} | ||
], | ||
"measurement": "HKQuantityTypeIdentifierStepCount", | ||
"orderByTime": "ASC", | ||
"policy": "default", | ||
"refId": "A", | ||
"resultFormat": "time_series", | ||
"select": [ | ||
[ | ||
{ | ||
"params": [ | ||
"value" | ||
], | ||
"type": "field" | ||
}, | ||
{ | ||
"params": [], | ||
"type": "sum" | ||
} | ||
] | ||
], | ||
"tags": [] | ||
} | ||
], | ||
"thresholds": [], | ||
"timeFrom": null, | ||
"timeShift": null, | ||
"title": "Steps", | ||
"tooltip": { | ||
"shared": true, | ||
"sort": 0, | ||
"value_type": "individual" | ||
}, | ||
"type": "graph", | ||
"xaxis": { | ||
"buckets": null, | ||
"mode": "time", | ||
"name": null, | ||
"show": true, | ||
"values": [] | ||
}, | ||
"yaxes": [ | ||
{ | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
}, | ||
{ | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
} | ||
], | ||
"yaxis": { | ||
"align": false, | ||
"alignLevel": null | ||
} | ||
} | ||
], | ||
"refresh": "5s", | ||
"schemaVersion": 16, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-2y", | ||
"to": "now" | ||
}, | ||
"timepicker": { | ||
"refresh_intervals": [ | ||
"5s", | ||
"10s", | ||
"30s", | ||
"1m", | ||
"5m", | ||
"15m", | ||
"30m", | ||
"1h", | ||
"2h", | ||
"1d" | ||
], | ||
"time_options": [ | ||
"5m", | ||
"15m", | ||
"1h", | ||
"6h", | ||
"12h", | ||
"24h", | ||
"2d", | ||
"7d", | ||
"30d" | ||
] | ||
}, | ||
"timezone": "", | ||
"title": "Health Data", | ||
"uid": "k0lVpINmz", | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: InfluxDB | ||
type: influxdb | ||
access: proxy | ||
database: health | ||
user: grafana | ||
password: grafana | ||
url: http://influxdb:8086 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters