Special Recipe is a webapp where you can search for recipes, bookmark them, and access them as needed. Each recipe can be viewed in detail along with its comments, and users can optionally leave a comment. The search functionality allows for both category and keyword searches, while users also have the option to browse all available recipes. Additionally, the website enables users to create or edit an account, reset lost passwords, and verify email addresses.
The project was created for educational purposes.
- Recipes page
- Adding / removing from bookmarks
- Recipe detail pages
- Bookmarks page
- Profile pages
- Authentication pages
- Django Rest API
- Postponed Tasks / Celery
- Recipe bookmarks
- Recipe comments
- Recipe markdown editing
- Registration / Authorization
- User profile
- Profile editing
- Password change / reset
- Email verification
- Tests
- For correct display, at least 3 recipes must be created regardless of the category.
- For correct display of images, their aspect ratio must be 16:10. Example: 1440×900, 1536×960, 1680:1050, 1920x1200...
- Clone or download the repository.
- Create a virtual environment and install requirements from requirements/local.txt file.
- Create an .env file or rename .env.dist in .env and populate it only with development variables:
- DEBUG
- SECRET_KEY
- DOMAIN_NAME
- ALLOWED_HOSTS
- INTERNAL_IPS
- PROTOCOL
- REDIS_HOST
- REDIS_PORT
- EMAIL_HOST_USER
- EMAIL_SEND_INTERVAL_SECONDS
- EMAIL_EXPIRATION_HOURS
- RECIPES_PAGINATE_BY
- CATEGORIES_PAGINATE_BY
- COMMENTS_PAGINATE_BY
- Make migrations:
python manage.py makemigrations
python manage.py migrate
- Run redis:
- Run celery:
- Windows:
celery -A core worker -l INFO -P solo
- Linux:
celery -A core worker -l INFO
- Windows:
- Run development server:
python manage.py runserver
- All actions with files are performed in the project directory.
- Don't forget to install docker and docker compose first.
- Clone or download the repository and go to its directory.
- Create an .env file or rename .env.dist in .env and populate it with all variables from .env.dist
file.
- In the REDIS_HOST, you need to specify not the local ip, but the name of the redis container, like this: REDIS_HOST=redis.
- Open data/nginx/nginx.conf file and change
server_name example.com www.example.com;
to your domains. - Grant executable rights to the entrypoint.sh script:
chmod +x ./entrypoint.sh
- Start the services:
docker-compose up --build -d
- Access nginx container:
docker exec -it <nginx-container-id> bin/sh
- Get ssl certificate:
certbot --nginx
- Done ! Now you can exit from nginx container:
exit