- Docker & Docker-compose
- Python 3.7
- Git
-
Firstly clone the project
git clone https://github.com/mkawsar/django-rest-api.git
-
Goto the project root directory and copy the environment file following the command
cp .env.example .env
-
Run the docker following the command
docker-composer up --build -d
-
After the completed check the docker container list
docker ps
-
Goto the django rest app with the docker container
-
docker exec -it {app containter ID or Name} bash
-
Collect the static files
python manage.py collectstatic --no-input
-
Updated the config/db/database_env to .env file with database credentials
-
Migrate the database
python manage.py migrate
-
Insert the users from database seeder
python manage.py add_user
-
-
Finally run the project with the following url
http://0.0.0.0:8000/
-
Firstly clone the project
git clone https://github.com/mkawsar/django-rest-api.git
-
Goto the project root directory and copy the environment file following the command
cp .env.example .env
- Update the postgres database name, host, username, password and schema name or public schema
-
Install the python dependencies following the command
pip install -r requirements.txt
-
Migrate the database
python manage.py migrate
-
Added users from migrate command
python manage.py add_user
-
Finally run the local server
python manage.py runserver