This project was developed to create an online recipe application.
- Register a new account and login to it;
- Create, view, update and delete recipes;
- Create, view, update and delete recipe tags;
- Create, view, update and delete recipe ingredients;
- Add images to the recipes;
- Filtering by tags and ingredients;
During the development of this project, the following techologies were used:
first, create a .env file based on the .env.sample template provided.
You should ensure that you have Docker installed on you computer. Once the verification is done, you can use the command below to create the docker image:
$ docker-compose build
To run the project in a development environment, execute the following command on the root directory.
$ docker-compose up
You can access Django Admin at: http://localhost:8000/admin
You can access the Swagger documentation at: http://localhost:8000/api/docs
Finally, a Makefile was created in order to help providing some of the commands listed above in a simple way.
To make it easier to provision infrastructure on cloud providers, you can make use of the Terraform template provided.
First, you'll need to install Terraform on your machine; then, since we're using AWS for the specified resources, you'll need to install the AWS CLI as well.
After that, you must set up an IAM user with permissions to manage resources, create an access key for the new user and configure the AWS CLI with the following command (entering the access key ID, secret access key, default region and outout format):
$ aws configure
Once these steps are done, you can use the Terraform commands to create, update and delete resources.
$ terraform init # Downloads the necessary provider plugins and set up the working directory
$ terraform plan # Creates the execution plan for the resources
$ terraform apply # Executes the actions proposed in a Terraform plan
$ terraform destroy # Destroys all remote objects managed by a particular Terraform configuration
If you want to provide the required variables for Terraform automatically when executing the script, you can create a file called prod.auto.tfvars file on the root directory, with all needed variables, according to the sample provided (auto.tfvars).
- Overview of best practices for writing Dockerfiles
- Codechecker
- GitHub Actions - Marketplace
- GitHub Actions - Docker Login
- GitHub Actions - Checkout
- psycopg2 dependencies
- Writing custom django-admin commands
- unittest.mock.Mock.side_effect
- django.test.SimpleTestCase
- django.contrib.auth.get_user_model
- django.contrib.auth.models.AbstractBaseUser.check_password
- auth-user-model
- Django Admin | Reversing admin URLs
- Django test client
- drf-spectacular
- drf-spectacular | URL Configuration
- Django REST framework | get_serializer_class(self)
- Python getattr()
- Django REST framework | Save and deletion hooks
- DRF Writeable nested relationships
- DRF create() and update() methods
- Django | Managing static files
- NamedTemporaryFile
- drf-spectacular | FileField
- drf-spectacular | Workflow & schema customization
- The 4 best ways to deploy a Django application
- uWSGI nginx params file
- Docker Hub: nginxinc/nginx-unprivileged
- Docker | Environment variables in Compose
- Chocolatey
- Notes: Creating SSH Deploy Key
- Notes: Install and Configure Dependencies
- Notes: Managing Service
- Install Docker Engine on Ubuntu
This project is under the MIT license. For more information, access LICENSE.