this is a Pastebin clone where users can store plain text.
- clone the project and go to the project directory using your terminal / CMD
- Docker
- Copy the content of
.env.templatefile and paste into the new created file.env - In
.envchange all configurations to your desired configurations - Run :
docker build . - Run :
docker-compose buildto build the docker image. - Run :
docker-compose up.
- The documetation should be now running under
http://127.0.0.1:8000/docs(if port 8000 is available)
- Create account from:
http://127.0.0.1:8000/auth/register/. - Go to
http://127.0.0.1:8000/auth/login-with-token/to get user token. - Then go to swagger authorize part and type:
Bearer <YOUR_TOKEN>, now you are logged in: - HINT: i made the authentication with JWT beacouse i can't understand the point of login with github, i send a following up email but i got no respond.
docker-compose run web sh -c "python manage.py list_pastes", will list all pastes in the system.docker-compose run web sh -c "python manage.py access_paste", will ask you to input the paste slug.docker-compose run web sh -c "python manage.py users_statistics", will shows statistics about the top 5 users (username and pastes count).docker-compose run web sh -c "python manage.py countries_statistics", will shows statistics about the top 5 countries.
- To Run unit tests :
docker-compose run web sh -c "python manage.py test".
- To access Admin dashboard :
http://127.0.0.1:8000/adminand the admin credentials are:admin,admin@1234.