“Food Assistant”: an application where users publish recipes for culinary products, you can subscribe to the publications of other authors and add recipes to your favorites. The “Shopping List” service will allow the user to create a list of products that need to be purchased to prepare the selected dishes according to the recipe/s.
- share your recipes
- see recipes from other users
- add recipes to favorites
- quickly create a shopping list by adding a recipe to your cart
- download a summary list of products
- keep track of your friends and colleagues
![image](https://private-user-images.githubusercontent.com/105780672/324257518-77c0fd4c-fcfe-4668-a3e0-a8e6f6ad97b1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4Njk5MTgsIm5iZiI6MTcyNDg2OTYxOCwicGF0aCI6Ii8xMDU3ODA2NzIvMzI0MjU3NTE4LTc3YzBmZDRjLWZjZmUtNDY2OC1hM2UwLWE4ZTZmNmFkOTdiMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyOFQxODI2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04Y2M5NTI0YWYzOThlY2EzYzBiY2FhNGM1NWM1MzA3MWNhZGY2ZjVkMjg2YjZjM2U0OWEyZDM3YTYxYWEzYWVmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.4IjPEervCNSN-lTJVI0MwGpEovAc-2bUnncSKYldY7w)
![image](https://private-user-images.githubusercontent.com/105780672/324257568-25845414-91c3-4140-8d48-b45313ab5231.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4Njk5MTgsIm5iZiI6MTcyNDg2OTYxOCwicGF0aCI6Ii8xMDU3ODA2NzIvMzI0MjU3NTY4LTI1ODQ1NDE0LTkxYzMtNDE0MC04ZDQ4LWI0NTMxM2FiNTIzMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyOFQxODI2NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zOWY1YzQyYTJlZDllMTUzYTYzMjg1NTMxYTU1OThlN2FjZjdiZDdhZjIxYjU0MWMzMThhY2YyMGVhOTE2OTI3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9._6sWtFvx9SMn3aBijt7qV5lHtjeN9hbFo15KqG0-2ZA)
Python
Django
Django Rest Framework
Docker
Gunicorn
NGINX
PostgreSQL
Yandex Cloud
Continuous Integration
Continuous Deployment
- Clone the repository
https://github.com/fabilya/cookingconnect.git
- Install Docker compose on the server:
sudo apt install curl # install the utility for downloading files
curl -fsSL https://get.docker.com -o get-docker.sh # download installation script
sh get-docker.sh # run script
sudo apt-get install docker-compose-plugin # latest version of docker compose
- To work with GitHub Actions, you need to create environment variables in the repository in the Secrets > Actions section:
SECRET_KEY # Django project secret key
DOCKER_PASSWORD # Docker Hub password
DOCKER_USERNAME # Docker Hub login
HOST # public IP of the server
USER # username on the server
PASSPHRASE # *if the ssh key is password protected
SSH_KEY # private ssh key
TELEGRAM_TO # Telegram account ID for sending a message
TELEGRAM_TOKEN # token of the bot sending the message
DB_ENGINE # django.db.backends.postgresql
POSTGRES_DB # postgres
POSTGRES_USER # postgres
POSTGRES_PASSWORD # postgres
DB_HOST # db
DB_PORT # 5432 (default port)
Everything we need is installed, then create the /infra folder in the home directory /home/username/: First, from the /backend and /frontend folders, upload the current data to DockerHub (on your PC)
docker login -u fabilya
cd backend
docker build -t fabilya/foodgram_backend:latest .
docker push fabilya/foodgram_backend:latest
We are preparing the front for the application, this is a template for sending to DH (where fabilya is your login for DH):
docker build -t fabilya/foodgram_frontend:latest .
docker push fabilya/foodgram_frontend:latest
Move the docker-compose.yml and default.conf files to the server, from the infra folder in the current repository (on your PC).
cd infra
scp docker-compose.yml username@server_ip:/home/username/
scp default.conf username@server_ip:/home/username/
This completes the setup, then in the infra folder we execute the command:
docker-compose up -d --build
The project will run on the VM and will be available at the address or IP you specified. To access the backend container and build the final part, run the following commands:
docker-compose exec backend python manage.py makemigrations users
docker-compose exec backend python manage.py makemigrations recipes
docker-compose exec backend python manage.py migrate --noinput
docker compose exec backend python manage.py load_tags
docker compose exec backend python manage.py load_ingrs
docker-compose exec backend python manage.py createsuperuser
docker-compose exec backend python manage.py collectstatic --no-input
The CookingConnect has been launched, you can fill it with recipes and share it with friends!