Giter VIP home page Giter VIP logo

mityay36 / foodgram-project-react Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 590 KB

Проект пищевого помощника, призванного облегчить приготовление блюд и составления покупок.

Dockerfile 0.26% HTML 1.00% CSS 15.29% JavaScript 55.52% Shell 0.84% Python 27.08%
django django-filters django-rest-framework docker docker-compose github-actions python

foodgram-project-react's Introduction

FOODGRAM

Foodram is a social platform for food enthusiasts to share their culinary experiences, discover new recipes, and connect with like-minded individuals. Whether you're a home cook or a professional chef, Foodram provides a space to showcase your culinary creations and explore a world of delicious possibilities.

Used libraries:

Features

  • Recipe Sharing: Share your favorite recipes with the community. Include detailed instructions, ingredients, and mouthwatering images.

  • Follow Users: Connect with other food lovers by following their profiles. Stay updated on their latest culinary creations.

  • Favorite Recipes: Save your favorite recipes to easily access them later. Build a personalized collection of go-to dishes.

  • Download Ingredient Lists: Need to shop for ingredients? Download the ingredient list of any recipe to make your grocery shopping a breeze.

Installation of the project:

Clone the repository and change into it on the command line:

git clone https://github.com/mityay36/foodgram-project-react/

Make your own .env file in main directory. All required variables are listed in .env.example

Perform Docker images

cd frontend
docker build -t YOUR_USERNAME/foodgram_frontend .
cd ../backend
docker build -t YOUR_USERNAME/foodgram_backend .
cd ../nginx
docker build -t YOUR_USERNAME/foodgram_gateway . 

Push your images to Docker Hub

docker push YOUR_USERNAME/foodgram_frontend
docker push YOUR_USERNAME/foodgram_backend
docker push YOUR_USERNAME/foodgram_gateway

Connect to our remote server

ssh -i PATH_TO_SSH_KEY/SSH_KEY_NAME YOUR_USERNAME@SERVER_IP_ADDRESS 

Make an "foodgram" directory

mkdir foodgram

Download DockerCompose on the server

sudo apt update
sudo apt install curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt install docker-compose

Copy docker-compose.production.yml and .env files to your server

scp -i PATH_TO_SSH_KEY/SSH_KEY_NAME docker-compose.production.yml YOUR_USERNAME@SERVER_IP_ADDRESS:/home/YOUR_USERNAME/foodgram/docker-compose.production.yml

Start Docker Compose in daemon mode

sudo docker-compose -f /home/YOUR_USERNAME/foodgram/docker-compose.production.yml up -d

Make migrations and collect static of your project

sudo docker-compose -f /home/YOUR_USERNAME/foodgram/docker-compose.production.yml exec backend python manage.py migrate
sudo docker-compose -f /home/YOUR_USERNAME/foodgram/docker-compose.production.yml exec backend python manage.py collectstatic
sudo docker-compose -f /home/YOUR_USERNAME/foodgram/docker-compose.production.yml exec backend cp -r /app/collected_static/. /backend_static/static/

Open nginx configuration file

sudo nano /etc/nginx/sites-enabled/default

Update your server location section

location / {
		proxy_set_header Host $http_host;
		proxy_pass http://127.0.0.1:9000;
}

Make sure the cof file is ok

sudo nginx -t

Reload nginx

sudo service nginx reload

Сайт доступен по ссылке:

Author

Dmitry Pokrovsky & Yandex.Practicum

foodgram-project-react's People

Contributors

mityay36 avatar

Watchers

 avatar

foodgram-project-react's Issues

Фикс стилей отображения переноса текста рецепта.

Теперь при публикации рецепта авторские переносы в тексте отображаются при публикации и не сливаются в один монолитный текст. Добавлены стили в frontend/src/pages/single-card/description/styles.module.css и применены в frontend/src/pages/single-card/description/index.js

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.