Clone the github repository from here
git clone https://github.com/anarchistMegaByte/breakit-backend.git
pip install virtualenv
virtualenv -p python3 env-name
source env-name/bin/activate (basically path to activate script of env)
Navigate to project folder and activate the environment before executing this command.
pip install -r requirements.txt
This is optional only if you have to schedule tasks. (Support for ubuntu systems. Windows system needs more configurations).
sudo apt-get install supervisor
General steps are as follows for ubuntu system:
sudo apt-get install postgresql-12
Steps to create a Database:
sudo -u postgres psql
postgres=# CREATE DATABASE sampledb;
CREATE DATABASE
postgres=# CREATE USER sampleUser WITH PASSWORD 'password';
CREATE ROLE
postgres=# ALTER ROLE sampleUser SET client_encoding TO 'utf8';
ALTER ROLE
postgres=# ALTER ROLE sampleUser SET default_transaction_isolation TO 'read committed';
ALTER ROLE
postgres=# ALTER ROLE sampleUser SET timezone TO 'UTC';
ALTER ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE sampledb TO sampleUser;
GRANT
postgres=# \q
Postgresg USer : postgres
Database Name : sampledb
Database User : sampleUser
Database Password : password
python manage.py makemigratios
python manage.py migrate
sudo apt install redis-server
python manage.py runserver 0.0.0.0:8000
Get your local IP address
Now you can use this endpoint for the front end applications.