-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathdocker-compose.yml
59 lines (57 loc) · 2.56 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3.4'
services:
# Initial setup. Run the following command first and enter a valie fitbit refresh token
# make sure the mapped logs and tokens folders exists and owned by 1000 uid, otherwise you may get permission denied error.
# docker compose run --rm fitbit-fetch-data
# Then exit out with ctrl + c
# Then run docker compose up -d to launch the full stack
fitbit-fetch-data:
restart: unless-stopped
image: thisisarpanghosh/fitbit-fetch-data:latest
container_name: fitbit-fetch-data
volumes:
- ./logs:/app/logs # logs folder should exist and owned by user id 1000
- ./tokens:/app/tokens # tokens folder should esist and owned by user id 1000
- /etc/timezone:/etc/timezone:ro
environment:
- FITBIT_LOG_FILE_PATH=/app/logs/fitbit.log
- TOKEN_FILE_PATH=/app/tokens/fitbit.token
- OVERWRITE_LOG_FILE=True
- INFLUXDB_VERSION=1
# Variables for influxdb 2.x ( you need to change the influxdb container config below accordingly )
- INFLUXDB_BUCKET=your_bucket_name_here # for influxdb 2.x
- INFLUXDB_ORG=your_org_here # for influxdb 2.x
- INFLUXDB_TOKEN=your_token_here # for influxdb 2.x
- INFLUXDB_URL=your_influxdb_server_location_with_port_here # for influxdb 2.x
# Variables for influxdb 1.x
- INFLUXDB_HOST=influxdb # for influxdb 1.x
- INFLUXDB_PORT=8086 # for influxdb 1.x
- INFLUXDB_USERNAME=fitbit_user # for influxdb 1.x
- INFLUXDB_PASSWORD=fitbit_password # for influxdb 1.x
- INFLUXDB_DATABASE=fitbit_database # for influxdb 1.x
# MAKE SURE you set the application type to PERSONAL. Otherwise, you won't have access to intraday data series, resulting in 40X errors.
- CLIENT_ID=your_application_client_ID # Change this to your client ID
- CLIENT_SECRET=your_application_client_secret # Change this to your client Secret
- DEVICENAME=Your_Device_Name # e.g. "Charge5"
- LOCAL_TIMEZONE=Automatic # set to "Automatic" for Automatic setup from User profile (if not mentioned here specifically).
# We are using influxdb 1.8 in this stack
influxdb:
restart: unless-stopped
container_name: influxdb
environment:
- INFLUXDB_DB=fitbit_database
- INFLUXDB_USER=fitbit_user
- INFLUXDB_USER_PASSWORD=fitbit_password
ports:
- '8086:8086'
volumes:
- './influxdb:/var/lib/influxdb'
image: 'influxdb:1.8'
grafana:
restart: unless-stopped
volumes:
- './grafana:/var/lib/grafana'
ports:
- '3000:3000'
container_name: grafana
image: 'grafana/grafana:latest'