Automated Munch product availability checker using Docker and Kubernetes, with notifications via ntfy.sh.
Go to file
Balazs Toldi 5ed3853973
Initial commit
Signed-off-by: Balazs Toldi <balazs@toldi.eu>
2023-06-30 16:40:36 +02:00
kubernetes Initial commit 2023-06-30 16:40:36 +02:00
.gitignore Initial commit 2023-06-30 16:40:36 +02:00
Dockerfile Initial commit 2023-06-30 16:40:36 +02:00
main.py Initial commit 2023-06-30 16:40:36 +02:00
README.md Initial commit 2023-06-30 16:40:36 +02:00
requirements.txt Initial commit 2023-06-30 16:40:36 +02:00

Munch Product Availability Checker

This repository contains a script that checks the availability of specified products on Munch and sends notifications via ntfy.sh when a product becomes available. This can be particularly useful for monitoring product availability for popular or rare items that are often sold out.

Getting Started

Docker

The project can be run using Docker. Configure the products to monitor by setting the PRODUCTS environment variable to a comma-separated list of Munch product URLs, and the NOTIFY_TOPIC environment variable to the desired topic on ntfy.sh where you want to receive the notifications.

docker run -it -e NOTIFY_TOPIC=<ntfy topic> -e PRODUCTS="<product url 1>,<product url 2>,..." -v munchdb:/app/data harbor.toldi.eu/library/munch-notification:v0.1

Build Docker Image

Alternatively, you can build the Docker image yourself using the included Dockerfile. Here is an example command on how to build the Docker image:

docker build -t your-dockerhub-username/munch-notification:v0.1 .

And run it with:

docker run -it -e NOTIFY_TOPIC=<ntfy topic> -e PRODUCTS="<product url 1>,<product url 2>,..." -v munchdb:/app/data your-dockerhub-username/munch-notification:v0.1

Kubernetes

You can also run this project in a Kubernetes cluster using the provided files in the kubernetes directory. Update the NOTIFY_TOPIC and PRODUCTS environment variables in the deployment.yaml file.

After editing the file, apply the Kubernetes configurations with the following commands:

kubectl apply -f kubernetes/pvc.yaml
kubectl apply -f kubernetes/deployment.yaml

Prerequisites

  • Docker installed (if you want to run the project with Docker or build the Docker image)
  • Kubernetes installed and configured (if you want to run the project in a Kubernetes cluster)
  • A topic on ntfy.sh where you want to receive the notifications
  • A list of Munch product URLs that you want to monitor

Contributing

We appreciate your contributions! Please fork this repository and make your changes in a separate branch. After making your modifications, submit a pull request.

Issues

If you encounter any issues or have feature requests, please file an issue in this repository.

License

This project is open-source and is licensed under the GNU General Public License v3.0. For more information, please see the LICENSE file.