Recipe API project on DJANGO
http://ec2-18-222-194-81.us-east-2.compute.amazonaws.com/api/docs/
This a Django web application that provides an API for managing recipes. The key steps and stages of development include:
-
User Model Creation: You created a user model that allows user registration and authentication.
-
Adding User Avatar: Extended user capabilities by allowing the upload and storage of avatars.
-
Recipe Management: Implemented functionality for adding, viewing, and editing recipes.
-
Fixes and API Enhancement: Addressed issues, added functionality, and expanded API capabilities for recipes.
-
Adding Images to Recipes: Implemented the ability to upload and store images for each recipe.
-
Configuration and Extension of Django Admin Interface: Configured the Django admin interface for more convenient user and recipe management.
-
Fixes and API Enhancement: Addressed issues, added functionality, and expanded API capabilities for recipes.
-
Recipe Filtering by Tags and Ingredients: Added the ability to filter recipes by tags and ingredients for convenient searching.
-
Django Admin Interface Customization: Customized the Django admin interface to improve the management and usability of user models.
-
API Documentation: Configured API documentation using drf-spectacular for better understanding and interaction with the API.
-
Deployment on AWS EC2: Deployed the project on an AWS EC2 server using Docker and configured necessary settings.
-
GitHub Deploy Key Setup: Set up a deploy key on GitHub for secure access to the repository from the EC2 instance.
-
AWS Account and User Setup: Created an AWS account, set up a user with appropriate permissions, and configured multi-factor authentication (MFA).
-
SSH Key Upload to AWS: Generated and uploaded an SSH key to AWS for secure access to EC2 instances.
-
Docker, Compose, and Git Installation: Installed Docker, Docker Compose, and Git on the EC2 instance for project deployment.
-
Clone and Configure Project: Cloned the project from GitHub, configured environment variables, and set up the project for execution.
-
Service Execution: Ran the Docker Compose command to start the services, allowing access to the application.
-
Documentation Update: Documented steps for setting up Docker, Compose, Git, cloning the project, and running the service.
-
Django Admin Customization: Customized the Django admin interface for better management of users.
-
URL Configuration: Updated URL configuration to include API schema and documentation endpoints.
This comprehensive development process results in a fully functional recipe management application with an API, user authentication, and enhanced administrative capabilities.
- 1.Initialization.md
- 2.Github Actions.md
- 3.Configure Database.md
- 4.Create User Model.md
- 5.Setup Django Admin.md
- 6.Api Documentation.md
- 7.Build User Api.md
- 8.Build Recipe Api.md
- 9.Build Tags API.md
- 10.Build Ingredients API.md
- 11.Recipe Image API.md
- 12.Implement filtering.md
- 13.Deployment.md
For run on local machine:
- Git clone.
- docker build .
- docker-compose build
- docker-compose up
- docker-compose run --rm app sh -c "flake8"
For AWS EC2:
ssh [email protected]
cd recipe-app-api
git pull origin
docker-compose -f docker-compose-deploy.yml build app
To view container logs, run:
docker-compose -f docker-compose-deploy.yml logs
To apply the update, run:
docker-compose -f docker-compose-deploy.yml up --no-deps -d app
The --no-deps -d
ensures that the dependant services (such as proxy
) do not restart.
For more detailed information see: 13.Deployment.md
Screenshot: