{"id":19248137,"url":"https://github.com/feel2code/foodgram-project-react","last_synced_at":"2025-02-23T16:14:19.988Z","repository":{"id":220410197,"uuid":"535108492","full_name":"feel2code/foodgram-project-react","owner":"feel2code","description":"study project on yandex.practicum backend developing training","archived":false,"fork":false,"pushed_at":"2024-05-10T13:03:59.000Z","size":5595,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-09T18:06:29.698Z","etag":null,"topics":["django-rest-framework","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feel2code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-10T20:13:26.000Z","updated_at":"2024-05-10T13:03:56.000Z","dependencies_parsed_at":"2024-02-01T23:17:14.846Z","dependency_job_id":null,"html_url":"https://github.com/feel2code/foodgram-project-react","commit_stats":null,"previous_names":["feel2code/foodgram-project-react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feel2code%2Ffoodgram-project-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feel2code%2Ffoodgram-project-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feel2code%2Ffoodgram-project-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feel2code%2Ffoodgram-project-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feel2code","download_url":"https://codeload.github.com/feel2code/foodgram-project-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232550596,"owners_count":18540502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django-rest-framework","rest-api"],"created_at":"2024-11-09T18:06:31.860Z","updated_at":"2025-01-05T05:23:57.331Z","avatar_url":"https://github.com/feel2code.png","language":"JavaScript","readme":"# [Foodgram Project - Food Assistant](https://github.com/feel2code/foodgram-project-react/)\n\n## Description\n\"Foodgram\" it's a study project from Yandex.Practicum training course - food assistant.\n\nThe service is designed for publishing recipes, adding favorite recipes to the favorites list, and subscribing to publications of other users. It also includes the functionality to download a list of ingredients needed to prepare dishes from selected recipes.\n\n### GitHub Workflow secrets\n\n- *DOCKER_USERNAME*: DockerHub username\n- **DOCKER_PASSWORD*: DockerHub password\n- *HOST*: public IP address of the server\n- *USER*: username for connecting to the server\n- *SSH_KEY*: private SSH key\n\n### Environment Variables\n\n- *DB_ENGINE*: django.db.backends.postgresql  # database engine\n- *DB_NAME*: postgres  # database name\n- *POSTGRES_USER*: postgres  # login to connect to the database\n- *POSTGRES_PASSWORD*: postgres  # password to connect to the database\n- *DB_HOST*: db  # container name\n- *DB_PORT*: 5432  # port to connect to the database\n- *ALLOWED_HOSTS*: *, localhost # allowed hosts\n- *SECRET_KEY*: key # Django application secret key\n\n## Project Setup\n```bash\n# Clone the repository and set up a virtual environment\ngit clone https://github.com/feel2code/foodgram-project-react \u0026\u0026 cd foodgram-project-react \u0026\u0026 python3 -m venv venv \u0026\u0026 source venv/bin/activate\n# For Windows\ngit clone https://github.com/feel2code/foodgram-project-react \u0026\u0026 cd foodgram-project-react \u0026\u0026 python3 -m venv venv \u0026\u0026 source venv/Scripts/activate\n\n# Update pip and install dependencies\npython -m pip install --upgrade pip \u0026\u0026 pip install -r backend/requirements.txt\n\n# Navigate to the directory with the docker-compose.yaml file\ncd infra\n\n# Run docker-compose\ndocker-compose up -d --build\n\n# After a successful build on the server, execute the following commands\ndocker-compose exec backend python manage.py collectstatic --noinput\n\n# Apply migrations\ndocker-compose exec backend python manage.py makemigrations\ndocker-compose exec backend python manage.py migrate --noinput\n\n# Command to populate the database with test data\ndocker-compose exec backend python manage.py loaddata db.json\n\n# Load data into the database\ndocker-compose exec backend python manage.py load_ingredients ingredients.json \u0026\u0026 docker-compose exec backend python manage.py load_ingredients tags.json\n\n# Create a Django superuser\ndocker-compose exec backend python manage.py createsuperuser\n```\n\n## Project Links:\nAfter launch, the project will be available at - http://localhost/\n\nThe admin panel will be accessible at - http://localhost/admin/\n\nAPI documentation can be found at - http://localhost/api/docs/\n\n### Stopping Containers:\n```bash\ndocker-compose down -v\n```\n\n## Running the Project on the Server\n### Connecting via SSH\n\n```bash\nssh \u003cusername\u003e@\u003cip-address\u003e\n```\n\n### Updating Packages:\n\n```bash\nsudo apt update -y \u0026\u0026 sudo apt upgrade -yy\n```\n\n### Installing Docker and Docker Compose:\n\n```bash\nsudo apt install docker docker-compose\n```\n\n### Installing Postgres DB:\n\n```bash\nsudo apt install postgresql postgresql-contrib\n```\n\nPrepare the nginx.conf file by entering the public server IP in the server_name line. Then copy the directory recursively to the server using scp.\n\n```bash\nscp -r infra \u003cusername\u003e@\u003chost\u003e:/infra\n```\n\nRunning the project is similar to the process on the local machine, except that all commands should be entered with sudo.\n\n\n## Technologies Used:\n\n*bash, Docker Hub, Nginx, Gunicorn 20.0.4, GitHub Actions, Yandex.Cloud.*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeel2code%2Ffoodgram-project-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeel2code%2Ffoodgram-project-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeel2code%2Ffoodgram-project-react/lists"}