feat: add image handling to recipes
- Implemented image downloading and optimization in QuickImportService. - Added imageUrl field to CreateRecipeDto for recipe creation. - Created an endpoint in RecipesController to update recipe images. - Enhanced RecipesService to handle image URL updates and optimizations. - Updated Docker Compose to mount a volume for recipe images. - Refactored frontend to display images in recipe grids and detail views. - Added a new utility function for downloading and optimizing images. - Created a new API route for handling image uploads. - Introduced RecipeGrid component for better recipe display. - Updated RecipeDetailClient to manage image updates and display. - Added migration for new imageUrl column in the Recipe table.
This commit is contained in:
@@ -8,6 +8,8 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: "http://recipe-api:8080"
|
||||
volumes:
|
||||
- recipe_images:/app/public/images
|
||||
depends_on:
|
||||
recipe-api:
|
||||
condition: service_healthy
|
||||
@@ -30,6 +32,8 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: "mysql://root:${MARIADB_ROOT_PASSWORD}@recipe-db:3306/${MARIADB_DATABASE}"
|
||||
volumes:
|
||||
- recipe_images:/app/recipe-images
|
||||
depends_on:
|
||||
recipe-db:
|
||||
condition: service_healthy
|
||||
@@ -68,6 +72,7 @@ services:
|
||||
|
||||
volumes:
|
||||
recipe_db_data:
|
||||
recipe_images:
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
|
||||
Reference in New Issue
Block a user