{"id":19690365,"url":"https://github.com/shourya1997/django-stackoverflow-clone","last_synced_at":"2025-07-15T03:33:17.149Z","repository":{"id":41921622,"uuid":"221424787","full_name":"shourya1997/django-stackoverflow-clone","owner":"shourya1997","description":"A Django 2.0+ project, a Stack Overflow clone called Answerly.","archived":false,"fork":false,"pushed_at":"2022-04-22T22:53:43.000Z","size":16690,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T14:34:38.651Z","etag":null,"topics":["coverage","django","django2","docker","elasticsearch","postgresql","python","selenium"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/shourya1997.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}},"created_at":"2019-11-13T09:44:54.000Z","updated_at":"2022-07-05T07:44:43.000Z","dependencies_parsed_at":"2022-08-11T22:01:20.345Z","dependency_job_id":null,"html_url":"https://github.com/shourya1997/django-stackoverflow-clone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shourya1997%2Fdjango-stackoverflow-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shourya1997%2Fdjango-stackoverflow-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shourya1997%2Fdjango-stackoverflow-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shourya1997%2Fdjango-stackoverflow-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shourya1997","download_url":"https://codeload.github.com/shourya1997/django-stackoverflow-clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251465366,"owners_count":21593870,"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":["coverage","django","django2","docker","elasticsearch","postgresql","python","selenium"],"created_at":"2024-11-11T19:05:20.184Z","updated_at":"2025-04-29T08:35:45.497Z","avatar_url":"https://github.com/shourya1997.png","language":"HTML","readme":"# Answerly\n\nThis is a simple Django 2.0+ project. Here I build a Stack Overflow clone called Answerly. Users can register for Answerly and will be able to ask and answer questions. A question's asker will also be able to accept answers to mark them useful and search similar type of questions.\n\n## Features\n\n- Django 2.0+\n- Uses [Pipenv](https://github.com/kennethreitz/pipenv) - the officially recommended Python packaging tool from Python.org.\n- Development, Staging and Production settings with [django-configurations](https://django-configurations.readthedocs.org).\n- PostgreSQL database support with psycopg2.\n- Using [Elasticsearch](https://www.elastic.co/) for finding answers. \n- For testing, Django integration tests, Selenium integration tests and [Coverage](https://coverage.readthedocs.io/en/coverage-5.0/) has been used.\n- Deploying project using Apache, mod_wsgi in Docker.\n\n## How to install\n\n```bash\n$ git clone https://github.com/shourya1997/django-stackoverflow-clone\n\n# create python virtual environment\n$ python3 -m venv myenv\n$ source myenv/bin/activate\n\n# -- developement requirements file\n$ pip install -r requirements.developement.txt\n\n# -- production requirements file\n$ pip install -r requirements.production.txt\n\n```\n\n## How to run\n\nSet the Environment variables in *Apache/localhost* (where ever you are deploying) mentioned in [answerly.ini](answerly.ini) and then run the following.\n\n```bash\n\n# -- common settings\n$ python manage.py runserver --settings=config.common_settings \n\n# -- developement settings\n$ python manage.py runserver --settings=config.dev_settings\n\n# -- production settings\n$ python manage.py runserver --settings=config.production_settings\n\n```\n\n## Deployment\n\nIt is possible to deploy to Heroku/EC2 or to your own server. We will set all the services through docker containers and bind the ports to localhost of every service.\n\n### Docker \n\n```bash\n# Run Apache and bind to localhost port 80\n$ sudo docker run -d -p 80:80 httpd \n\n# Pull Elasticsearch and bind to localhost: 9200 and 9300\n$ docker pull docker.elastic.co/elasticsearch/elasticsearch:7.4.2\n$ docker run -d -p 9200:9200 -p 9300:9300 -e \"discovery.type=single-node\" docker.elastic.co/elasticsearch/elasticsearch:7.4.2 \n\n# Pull postrgeSQL and bind to localhost: 5432\n## stop local postgres if port already in use or stop conatiner which is might be using the port\n$ sudo docker run -d -p 5432:5432 postgres:12.1\n\n# Getting inside container\n$ sudo docker exec -it \u003ccontainer id\u003e bash\n\n# Install packages in Apache Docker\n$ apt install -y $(cat answerly/ubuntu/packages.txt)\n\n# Set Postgres permissions in Postgres contaniner\n$ bash postgres/make_database.sh\n\n# IP address of docker container \n$ sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' \u003ccontainer ID\u003e\n\n# Commit container with required libraries\n$ sudo docker commit \u003ccontainer NAMES\u003e \u003cNEW Container NAME\u003e:\u003cTAG\u003e\n\n# Collect static\n$ python3 manage.py collectstatic --settings=config.production_settings --no-input   \n```\n\nTODO: Make DOCKERFILE for the above process.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2012-2017 José Padilla\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshourya1997%2Fdjango-stackoverflow-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshourya1997%2Fdjango-stackoverflow-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshourya1997%2Fdjango-stackoverflow-clone/lists"}