Installation_guide - OpenGenus/cosmos-search GitHub Wiki

Installation guide to run Cosmos-Search locally

The average time to setup Cosmos-Search locally has been reported to be :bullettrain_side: 2 minutes. Follow the following steps to get started instantly:

  1. Clone this wonderful repository in your local machine :desktop_computer: :

    $ git clone https://github.com/OpenGenus/cosmos-search.git
    
  2. Go inside code :house_with_garden: :

    $ cd cosmos-search
    
  3. Setup a virtual environment :houses: :

    $ virtualenv -m python3 env_name OR $ python3 -m venv env_name

  4. Activate the virtual environment :cyclone: :

    $ source env_name/bin/activate
    

    The virtual environment can be deactivated with the deactivate command.

  5. Install local dependencies :hammer_and_wrench: :

     pip install -r requirements.txt
    
  6. Copy the .env.example file to .env and supply values for the required variables using the following command :running_man: :

      cp .env.example .env
    
  7. Collect static files using :books: :

    $ python manage.py collectstatic
    
  8. Migrating files using :incoming_envelope: :

    $ python manage.py migrate
    
  9. Run Cosmos-Search :car: :

    $ python manage.py runserver
    
  10. View this wonderful search engine built for you :heart_eyes: :

    localhost:8000
    

To run the web app in Debug mode set the DEBUG environment variable. In Linux, run the export DEBUG=True command in the terminal.

Any questions?

Get in touch with us at Slack or ask us at our Discourse forum.