https://github.com/renegatemaster/foodgram-project-react
Find and create recipes, add them to favorite and shopping cart, download ingredients from your cart.
https://github.com/renegatemaster/foodgram-project-react
django django-rest-framework docker github-actions gunicorn nginx postgresql python
Last synced: 3 months ago
JSON representation
Find and create recipes, add them to favorite and shopping cart, download ingredients from your cart.
- Host: GitHub
- URL: https://github.com/renegatemaster/foodgram-project-react
- Owner: renegatemaster
- Created: 2023-07-03T05:39:44.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-07T11:23:37.000Z (over 2 years ago)
- Last Synced: 2025-07-05T22:41:43.074Z (12 months ago)
- Topics: django, django-rest-framework, docker, github-actions, gunicorn, nginx, postgresql, python
- Language: JavaScript
- Homepage:
- Size: 15.8 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foodgram
_Cайт для ваших рецептов_

### Информация для проверки
Адрес сайта:
https://food-gram.sytes.net/
Для входа в админку:
```
email: admin@admin.com
password: admin
```
### Как с этим работать?
Клонируем репозиторий и переходим в него в командной строке:
```bash
git clone git@github.com:renegatemaster/foodgram-project-react.git
cd foodgram-project-react
```
Cоздаём и активируем виртуальное окружение, устанавливаем зависимости:
```bash
python3.9 -m venv venv && \
source venv/bin/activate && \
python -m pip install --upgrade pip && \
pip install -r backend/requirements.txt
```
Устанавливаем [докер](https://www.docker.com/) на свой компьютер.
Запускаем проект через docker-compose:
```bash
docker compose -f docker-compose.yml up --build -d
```
Выполняем миграции:
```bash
docker compose -f docker-compose.yml exec backend python manage.py migrate
```
Соберём статику и скопируем ее:
```bash
docker compose -f docker-compose.yml exec backend python manage.py collectstatic && \
docker compose -f docker-compose.yml exec backend cp -r /app/static_backend/. /backend_static/static/
```
В корне проекта создайте файл .env и пропишите в него свои данные.
Пример:
```apache
SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG=False
POSTGRES_DB=foodgram
POSTGRES_USER=foodgram_user
POSTGRES_PASSWORD=foodgram_password
DB_NAME=foodgram
DB_HOST=db
DB_PORT=5432
ALLOWED_HOSTS='127.0.0.1 localhost'
```
Для развёртывания на удалённом сервере ипользуется GitHub Actions
При пуше проекта на гит происходит проверка тестами/линтерами, создаются и пушатся контейнеры на DockerHub, приложение разворачивается в сети контейнеров на удалённом сервере.