Docker - Web UI
P2G provides a website user interface. Some key features include:
- Configure your settings via a user interface
- Trigger a sync from any browser (your computer, your phone, etc.)
- Sync service can still run in the background, syncing periodically
- OpenApi for custom scripts and workflows
docker-compose
Pre-requisite: You have either docker-compose
or Docker Desktop
installed
- Create a folder named
p2g-webui
- Inside this folder create docker-compose.yaml
- Also create api.local.json
- Also create webui.local.json
- Open a terminal in this folder
- Run:
docker-compose pull && docker-compose up -d
- This will pull the containers and start them up running in the background
- You can close the terminal at this time
- Open a browser and navigate to
http://localhost:8002
Any logs or generated files will be available in the output
directory. Additionally, you can learn more about customizing your configuration over in the Configuration Section
To stop P2G
- You can use Docker Desktop application to kill the containers
- Or, you can open a terminal in the
p2g-webui
folder- Run:
docker-compose down
- Run:
To update P2G
- Open a terminal in the
p2g-webui
folder- Run:
docker-compose pull && docker-compose up -d
- Run:
Configuration
If you are migrating to the Web UI for the first time you will need to reconfigure most of your settings using the user interface. The only settings that are carried over and still configured via the configuration file are the ones related to Observability
.
Open Api
To access the Open API spec for P2G you will need to expose the below port on the Api docker container. The open API spec will be available at http://localhost:8001/swagger
.
version: "3.9"
services:
p2g-api:
container_name: p2g-api
image: philosowaffle/peloton-to-garmin:api-stable
environment:
- TZ=America/Chicago
ports:
- 8001:8080 # to access the api or swagger docs
volumes:
- ./api.local.json:/app/configuration.local.json
- ./data:/app/data
- ./output:/app/output
p2g-webui:
container_name: p2g-webui
image: philosowaffle/peloton-to-garmin:webui-stable
ports:
- 8002:8080
environment:
- TZ=America/Chicago
volumes:
- ./webui.local.json:/app/configuration.local.json
depends_on:
- p2g-api