57 lines
2.5 KiB
Markdown
57 lines
2.5 KiB
Markdown
# Munch Product Availability Checker
|
|
|
|
This repository contains a script that checks the availability of specified products on [Munch](https://munch.hu) and sends notifications via [ntfy.sh](https://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.
|
|
|
|
```shell
|
|
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:
|
|
|
|
```shell
|
|
docker build -t your-dockerhub-username/munch-notification:v0.1 .
|
|
```
|
|
|
|
And run it with:
|
|
|
|
```shell
|
|
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:
|
|
|
|
```shell
|
|
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](https://github.com/username/reponame/issues) 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](https://github.com/username/reponame/blob/main/LICENSE) file.
|