Project: Eat Repeat
Overview
Eat Repeat is a pet project featuring a full-stack web application. It consists of a backend API written in Go and a frontend using htmx and Go templates. The project revolves around managing recipes, scheduling them for the week, and providing an interface to view the selected recipes for the current week.
Features
Backend (Go)
Docker Setup
The backend includes a Docker setup for containerization. The Dockerfile is divided into build stages for frontend and backend.
Frontend (HTML, htmx, Node.js)
-
Two Main Pages:
- Recipes: Displays a list of recipes.
- Current Week's Selected Recipes: Shows recipes scheduled for the current week.
-
Scheduling Recipes:
- Allows users to schedule recipes for a specific week.
-
Docker Container:
- The frontend build is containerized using Node.js.
CI/CD Pipeline (Drone)
The project has a CI/CD pipeline set up using Drone. The pipeline triggers on pushes to the main branch and feature branches, as well as pull requests. The key steps include:
- Build and Deploy:
- Uses Docker plugins to build and deploy the application.
- Retrieves environment variables such as
DRONE, DRONE_TAG, DRONE_COMMIT, DRONE_BRANCH, and configurable settings from secrets.
- Tags Docker images based on the branch name.
- Pushes the images to the specified Docker registry.
How to Run
To run the project locally, follow these steps:
-
Clone the repository.
-
Navigate to the project root.
-
Build the Docker image:
docker build -t eat-repeat .
-
Run the Docker container:
docker run -p 8080:8080 -e RUN_MIGRATION=true -e PDF_READER_ENDPOINT=http://example.com -e WORKER_TIMEOUT_IN_SECONDS=30 eat-repeat
-
Access the application in your browser at http://localhost:8080.
Feel free to explore and enhance the project as needed. If you have any questions or suggestions, please let me know!