{"id":15107870,"url":"https://github.com/daronenko/askme-service","last_synced_at":"2025-04-05T14:42:02.744Z","repository":{"id":230904025,"uuid":"773456098","full_name":"daronenko/askme-service","owner":"daronenko","description":"community-supported service that allows users to ask questions and get answers to them","archived":false,"fork":false,"pushed_at":"2024-05-29T21:33:36.000Z","size":382,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-18T11:15:15.090Z","etag":null,"topics":["ask","askme","compose","django","docker","postgres","python","vk","vk-education"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daronenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2024-03-17T17:56:06.000Z","updated_at":"2024-11-10T22:33:24.000Z","dependencies_parsed_at":"2024-04-09T23:40:58.910Z","dependency_job_id":"f4ec4c75-074e-4132-b820-37534b4d2d22","html_url":"https://github.com/daronenko/askme-service","commit_stats":null,"previous_names":["daronenko/askme_mironenko","daronenko/askme-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Faskme-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Faskme-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Faskme-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daronenko%2Faskme-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daronenko","download_url":"https://codeload.github.com/daronenko/askme-service/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353680,"owners_count":20925325,"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":["ask","askme","compose","django","docker","postgres","python","vk","vk-education"],"created_at":"2024-09-25T21:42:12.185Z","updated_at":"2025-04-05T14:42:02.720Z","avatar_url":"https://github.com/daronenko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Ask Service\n\ncommunity-supported service that allows users to ask questions and get answers to them\n\n\u003c/div\u003e \n\n## Contents\n\n* [Requirements](#requirements)\n* [Getting Started](#getting-started)\n  * [MacOS \u0026 Linux](#macos-linux)\n    * [Local](#local-steps)\n    * [Docker](#docker-steps)\n* [Commands](#commands)\n  * [Local](#local-commands)\n  * [Docker](#docker-commands)\n* [Benchmarks](#benchmarks)\n\n## Requirements \u003ca name=\"requirements\"\u003e\u003c/a\u003e\n\n* [docker](https://docs.docker.com/)\n* [docker compose](https://docs.docker.com/compose/)\n* [make](https://www.gnu.org/software/make/manual/make.html)\n* [centrifugo](https://centrifugal.dev/)\n\n\u003e [!IMPORTANT]  \n\u003e The project supports docker compose v2 by default, but if you want to use v1, then you need to add the `DOCKER_COMPOSE = docker-compose` line in the `Makefile.local`.\n\n## Getting Started \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\n### MacOS \u0026 Linux \u003ca name=\"macos-linux\"\u003e\u003c/a\u003e\n\n#### Local \u003ca name=\"local-steps\"\u003e\u003c/a\u003e\n\n1. Setup virtual environment:\n\n```shell\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n2. Start postgres database\n\n3. Apply migrations:\n\n```shell\nmake migrate\n```\n\n4. Fill db with generated data:\n\n```shell\nmake fill-db ratio=100\n```\n\n5. Warm up cache:\n\n```shell\nmake warmup-cache\n```\n\n6. Run centrifugo server (available on `127.0.0.1:8001`):\n\n```shell\nmake cent\n```\n\n7. Run project:\n\n```shell\nmake run\n```\n\n8. Open the `127.0.0.1:8000` path in the browser\n\n#### Docker \u003ca name=\"docker-steps\"\u003e\u003c/a\u003e\n\n1. Set the `IN_DOCKER` variable in `app/core/local_settings.py` to `True`\n\n```python\nIN_DOCKER = True\n```\n\n2. Build the container:\n\n```shell\nmake docker-build\n```\n\n3. Apply migrations:\n\n```shell\nmake docker-migrate\n```\n\n\u003e [!IMPORTANT]  \n\u003e If you see in the logs that the database does not accept requests, it means that the database container started later than the application container. In this case, you need to run the command again or manually launch the database container first (`docker start postgres-service-container`).\n\n4. Fill db with generated data:\n\n```shell\nmake docker-fill-db ratio=100\n```\n\n5. Run project:\n\n```shell\nmake docker-run\n```\n\n5. Open the `0.0.0.0:8000` path in the browser (centrifugo server available on `0.0.0.0:8001`)\n\n6. Stop and remove docker containers:\n\n```shell\nmake clear-docker\n```\n\n## Commands \u003ca name=\"commands\"\u003e\u003c/a\u003e\n\n### Local \u003ca name=\"local-commands\"\u003e\u003c/a\u003e\n\n* `make migrations` - create migrations\n* `make migrate` - apply migrations\n* `make fill-db ratio=\u003cratio\u003e` - fill database with generated data\n* `make warmup-cache` - warm up the cache\n* `make cent` - start centrifugo server\n* `make run` - start gunicorn server\n* `make superuser` - create superuser\n* `make clear-db` - remove data from database\n* `make clear-db-schema` - remove database schema and data in it\n\n### Docker \u003ca name=\"docker-commands\"\u003e\u003c/a\u003e\n\n* `make docker-migrations` - create migrations\n* `make docker-migrate` - apply migrations\n* `make docker-fill-db ratio=\u003cratio\u003e` - fill database with generated data\n* `make docker-run` - start gunicorn server\n* `make docker-superuser` - create superuser\n* `make docker-clear-db` - remove data from database\n* `make docker-clear-db-schema` - remove database schema and data in it\n* `make clear-docker` - stop and remove containers\n\n## Benchmarks \u003ca name=\"benchmarks\"\u003e\u003c/a\u003e\n\nThe results of the service's benchmarks are [here](docs/benchmarks.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaronenko%2Faskme-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaronenko%2Faskme-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaronenko%2Faskme-service/lists"}