One of the biggest complaints I have for Peloton is that lack of integration with Garmin, as I like to see all my fitness data in one place. Having everything syncing makes things like tracking calories and macros easier in apps like MyFitnessPall. For years now, I have been leveraging an application called Peloton to Garmin to sync the data between the two platforms, but having it live on my NAS so I can run it from any computer in the house was good enough for a while, until they released a version for Docker. That changed everything.
Unfortunately, setting it up wasn’t as straight forward as I would have hoped. The compose file kept throwing errors in Portainer until I figured out that it was trying to create a directory instead of a file. Once that was sorted, everything was smooth sailing.
If you are interested in getting Peloton to Garmin running on Portainer, here is how I did it.
Open Putty or your preferred SSH client and connect to your server
Create a directory called p2g-webui in /home
cd /home
mkdir p2g-webui
Use nano or vi to create a file named webui.local.json
sudo nano webui.local.json
Paste the code below
{
"Api": {
"HostUrl": "http://p2g-api:8080"
},
"Observability": {
"Prometheus": {
"Enabled": false
},
"Jaeger": {
"Enabled": false,
"AgentHost": "localhost",
"AgentPort": 6831
},
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Error",
"System": "Error"
}
},
"WriteTo": [
{ "Name": "Console" }
]
}
}
}
Use nano or vi to create a file named api.local.json
sudo nano api.local.json
Paste the code below
{
"Observability": {
"Prometheus": {
"Enabled": false
},
"Jaeger": {
"Enabled": false,
"AgentHost": "localhost",
"AgentPort": 6831
},
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Error",
"System": "Error"
}
},
"WriteTo": [
{ "Name": "Console" }
]
}
}
}
Create a new Stack in Portainer named p2gwebui
Paste the following
services:
p2g-api:
container_name: p2g-api
image: philosowaffle/peloton-to-garmin:api-stable
environment:
- TZ=America/New_York
# ports:
# - 8001:8080 # optional, only if you plan to interact with the API directly
volumes:
- /home/p2g-webu/api.local.json:/app/configuration.local.json
- /home/p2g-webu/data:/app/data # recommended for saving settings across restarts
- /home/p2g-webu/output:/app/output # optional, if you want access to the generated workout and log files
p2g-webui:
container_name: p2g-webui
image: philosowaffle/peloton-to-garmin:webui-stable
ports:
- 8002:8080
environment:
- TZ=America/New_York
volumes:
- /home/p2g-webu/webui.local.json:/app/configuration.local.json
depends_on:
- p2g-api
Click Deploy the Stack, configure from the webui at port 8002 and enjoy!