A lightweight, full-stack app allowing me to create, update and delete espresso recipes. I use this app locally to store bean brands and their dialed in recipes.
This is a sample image of the webpage:
The frontend uses Svelte and AstroJS to make building static sites a breeze.
The backend serves the static files using Axum and stores the recipes in a simple JSON file (a database would be overkill).
- Clone the repository.
- Enter the
coffee-notebook/folder, and run./prepare_docker.shto build the static Astro files. - In the same directory, run
docker build -t coffee_notebook .to build the docker image. - Run
docker images, and confirm you see acoffee_notebookimage. - Run
docker run -d -p PORT:3000 --name coffee_notebook_instance coffee_notebook, changingPORTwith your desired out-facing port. - Access the webpage to confirm it's running!
If you would like to access the coffee.json file to save your recipes elsewhere, run (sudo) docker exec -it INSTANCE_NAME /bin/bash and then cat coffee.json. This will output the JSON file contents. If you spin up a new instance and already have the JSON file, you can just echo JSON_CONTENTS > coffee.json to load the recipes into the backend.
