Too Good To Go is a platform for local food stores and restaurants to reduce food waste. The goal is to save meals which are close to their due date. Stores can make items available for reservation with discounts. Bringing your own package is required!
This application is a simple scheduler which tracks new available items on Too Good To Go. It uses an unofficial API client by Anthony Hivert to check for new available items.
To deploy the application I use Docker Compose to run my python scheduler and a MongoDB containerized. I gathered some inspiration from a docker blog and Awesome Compose.
git clone https://github.com/steinmaerivoet/toogoodtogo-notifier.git
- Add
tgtg.conf
toscheduler/
[tgtg] email = password = [mongo] host = port = username = password = database = [callback] url = [scheduler] sync_interval_seconds =
- Add
.env
to./
to add MongoDB credentials as environment variables.MONGO_USERNAME= MONGO_PASSWORD=
- Run
docker-compose build
- Run
docker-compose up -d
The Mongo DB service is exposed at port 27888
for local access.