Skip to content

MMK21Hub/som-watcher

Repository files navigation

Summer of Making Monitor

Stock tracking for the Summer of Making shop using Prometheus metrics.

Uses the SoM Monitor API by Skyfall for shop data <3

Online demo

Screenshot of a Grafana dashboard stats from the program

🌍 View dashboard on grafana.slevel.xyz

Local development

This project uses Python (3.9+) and uv for development.

  1. Clone the repo
  2. uv run main.py
  3. Head to http://localhost:9040/metrics to see the metrics

Production deployment with Docker Compose

  1. Download the example Compose file from deployment/docker-compose.yml. Feel free to adjust it to your needs.
  2. Start it with docker-compose up -d
  3. Metrics should now be available at http://localhost:9040/metrics

Example prometheus.yml config

Start tracking the metrics by adding Daydream Watcher as a scrape config to a Prometheus-compatible database (e.g. Prometheus, VictoriaMetrics).

scrape_configs:
  - job_name: som-watcher
    scrape_interval: "10s"
    static_configs:
      - targets: ["som-watcher:9040"]

Maintainers: Releasing a new version

First, check existing tags on Docker Hub.

Then, use the release-new-version.sh shell script, e.g.

./release-new-version.sh 0.2.1

It will

  1. Bump the version in pyproject.toml
  2. Create and push a Git tag for the new version
  3. Build and publish the Docker image to Docker Hub

Then, manually check that the version bump commit is as expected, and git push it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published