Git Product home page Git Product logo

cookingconnect's Introduction

CookingConnect

Снимок экрана 2024-04-21 180715

Content:

Project description

“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.

Service capabilities

  • 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 image

Technologies

Python Django Django Rest Framework Docker Gunicorn NGINX PostgreSQL Yandex Cloud Continuous Integration Continuous Deployment

Deploy the project on a remote server:

  • 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!

Authors:

Fabiyanskiy Ilya

cookingconnect's People

Contributors

fabilya avatar dependabot[bot] avatar

Stargazers

alison hodgson avatar Konstantin Steblev avatar Alex Ten avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.