Standartized docker-compose files. Added some documentation (AI generated)
This commit is contained in:
41
garmin-grafana/README.md
Normal file
41
garmin-grafana/README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Garmin Grafana
|
||||
|
||||
This directory contains a Docker Compose setup for a Garmin Grafana dashboard.
|
||||
|
||||
This setup will fetch your Garmin Connect data and store it in an InfluxDB database. You can then use Grafana to visualize the data.
|
||||
|
||||
## Docker Compose Setup
|
||||
|
||||
### Services
|
||||
|
||||
- **garmin-fetch-data**: Fetches your Garmin Connect data and stores it in InfluxDB.
|
||||
- **influxdb**: An InfluxDB database for storing your Garmin Connect data.
|
||||
- **grafana**: A Grafana instance for visualizing your Garmin Connect data.
|
||||
|
||||
### Volumes
|
||||
|
||||
- `${GARMINCONNECT_TOKENS}`: Stores the Garmin Connect tokens.
|
||||
- `influxdb_data`: Stores the InfluxDB database files.
|
||||
- `grafana_data`: Stores the Grafana configuration files.
|
||||
|
||||
### Ports
|
||||
|
||||
- `8086:8086`: The InfluxDB API is accessible on port 8086.
|
||||
- `3000:3000`: The Grafana web interface is accessible on port 3000.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Create a `.env` file with the following variables:
|
||||
|
||||
```
|
||||
# Your Garmin Connect email address
|
||||
GARMINCONNECT_EMAIL=<your_email>
|
||||
|
||||
# Your Garmin Connect password, base64 encoded
|
||||
GARMINCONNECT_PASSWORD=<your_base64_encoded_password>
|
||||
|
||||
# Path to a directory where the Garmin Connect tokens will be stored
|
||||
GARMINCONNECT_TOKENS=/path/to/garminconnect/tokens
|
||||
```
|
||||
|
||||
2. Run `docker-compose up -d` to start the containers.
|
||||
@@ -1,52 +1,52 @@
|
||||
services:
|
||||
garmin-fetch-data:
|
||||
restart: unless-stopped
|
||||
image: thisisarpanghosh/garmin-fetch-data:latest
|
||||
container_name: garmin-fetch-data
|
||||
depends_on:
|
||||
- influxdb
|
||||
volumes:
|
||||
- ${GARMINCONNECT_TOKENS}:/home/appuser/.garminconnect # (persistant tokens storage - garminconnect-tokens folder must be owned by 1000:1000)
|
||||
environment:
|
||||
- INFLUXDB_HOST=influxdb
|
||||
- INFLUXDB_PORT=8086
|
||||
- INFLUXDB_USERNAME=influxdb_user
|
||||
- INFLUXDB_PASSWORD=influxdb_secret_password
|
||||
- INFLUXDB_DATABASE=GarminStats
|
||||
- UPDATE_INTERVAL_SECONDS=300
|
||||
- LOG_LEVEL=INFO
|
||||
- GARMINCONNECT_EMAIL=${GARMINCONNECT_EMAIL}
|
||||
- GARMINCONNECT_BASE64_PASSWORD=${GARMINCONNECT_PASSWORD} # (must be base64 encoded)
|
||||
|
||||
|
||||
influxdb:
|
||||
restart: unless-stopped
|
||||
container_name: influxdb
|
||||
hostname: influxdb
|
||||
environment:
|
||||
- INFLUXDB_DB=GarminStats
|
||||
- INFLUXDB_USER=influxdb_user
|
||||
- INFLUXDB_USER_PASSWORD=influxdb_secret_password
|
||||
- INFLUXDB_DATA_INDEX_VERSION=tsi1
|
||||
ports:
|
||||
- '8086:8086'
|
||||
volumes:
|
||||
- influxdb_data:/var/lib/influxdb
|
||||
image: 'influxdb:1.11'
|
||||
|
||||
grafana:
|
||||
restart: unless-stopped
|
||||
container_name: grafana
|
||||
hostname: grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
ports:
|
||||
- '3000:3000'
|
||||
image: 'grafana/grafana:latest'
|
||||
|
||||
volumes:
|
||||
influxdb_data:
|
||||
services:
|
||||
garmin-fetch-data:
|
||||
restart: unless-stopped
|
||||
image: thisisarpanghosh/garmin-fetch-data:latest
|
||||
container_name: garmin-fetch-data
|
||||
depends_on:
|
||||
- influxdb
|
||||
volumes:
|
||||
- ${GARMINCONNECT_TOKENS}:/home/appuser/.garminconnect # (persistant tokens storage - garminconnect-tokens folder must be owned by 1000:1000)
|
||||
environment:
|
||||
- INFLUXDB_HOST=influxdb
|
||||
- INFLUXDB_PORT=8086
|
||||
- INFLUXDB_USERNAME=influxdb_user
|
||||
- INFLUXDB_PASSWORD=influxdb_secret_password
|
||||
- INFLUXDB_DATABASE=GarminStats
|
||||
- UPDATE_INTERVAL_SECONDS=300
|
||||
- LOG_LEVEL=INFO
|
||||
- GARMINCONNECT_EMAIL=${GARMINCONNECT_EMAIL}
|
||||
- GARMINCONNECT_BASE64_PASSWORD=${GARMINCONNECT_PASSWORD} # (must be base64 encoded)
|
||||
|
||||
|
||||
influxdb:
|
||||
restart: unless-stopped
|
||||
container_name: influxdb
|
||||
hostname: influxdb
|
||||
environment:
|
||||
- INFLUXDB_DB=GarminStats
|
||||
- INFLUXDB_USER=influxdb_user
|
||||
- INFLUXDB_USER_PASSWORD=influxdb_secret_password
|
||||
- INFLUXDB_DATA_INDEX_VERSION=tsi1
|
||||
ports:
|
||||
- '8086:8086'
|
||||
volumes:
|
||||
- influxdb_data:/var/lib/influxdb
|
||||
image: 'influxdb:1.11'
|
||||
|
||||
grafana:
|
||||
restart: unless-stopped
|
||||
container_name: grafana
|
||||
hostname: grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
ports:
|
||||
- '3000:3000'
|
||||
image: 'grafana/grafana:latest'
|
||||
|
||||
volumes:
|
||||
influxdb_data:
|
||||
grafana_data:
|
||||
Reference in New Issue
Block a user