mirror of
https://github.com/mylesagray/boilerjuice-tank-api
synced 2026-02-28 20:42:14 +00:00
No description
- Python 84.4%
- Dockerfile 15.6%
|
|
||
|---|---|---|
| .github/workflows | ||
| .harness | ||
| app | ||
| img | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Pipfile | ||
| Pipfile.lock | ||
| readme.md | ||
| renovate.json | ||
Boilerjuice Scraping API
Intro
Boilerjuice.com has no public API, and pages are rendered via PHP with data pre-baked, as a result - to get information back from the site about your Oil Tank's current level you need to auth with the site and scrape the data back from the web pages.
That is what this project does.
Function
Example input page:
Example API output:
{
"capacity":"1055",
"litres":750.0,
"percent":"70",
"total_litres":950.0,
"total_percent":"90"
}
Run
Run the API:
docker run -d -p 8080:8080 -e BJ_USERNAME=my@emailaddress.com -e BJ_PASSWORD=password ghcr.io/mylesagray/boilerjuice-tank
Docker images are available on DockerHub or GitHub Container Registry:
ghcr.io/mylesagray/boilerjuice-tank
mylesagray/boilerjuice-tank
Use
Access the API:
open http://localhost:8080
Access Prometheus scraping endpoint:
open http://localhost:8080/metrics
Build
Build multiarch image:
docker buildx create --use
docker buildx build --platform linux/arm64,linux/amd64 -t mylesagray/boilerjuice-tank:v0.2 -t mylesagray/boilerjuice-tank -t ghcr.io/mylesagray/boilerjuice-tank:v0.2 -t ghcr.io/mylesagray/boilerjuice-tank --push .
