Class based view django blog website. Based on https://github.com/AliBigdeli/mysite project.
- Install docker and docker compose.
- Clone the repository.
- Run the docker compose:
docker-compose -f docker-compose-production.yml up -d --build
- Create database:
docker exec backend python manage.py migrate
- Open your browser and go to http://localhost/.
Blog endpoints: http://localhost/blog/api/v1/
- DRF built-in documentation: http://localhost/drf-docs/
- Swagger documentation: http://localhost/swagger/
- Redoc documentation: http://localhost/redoc/
- Export swagger in json format: http://localhost/swagger/output.json/
The celery beat creates a new post automatically every 10 minutes.
For creating five dummy posts:
run docker-compose exec backend sh -c "python manage.py insert_data"
For running pytest:
run docker-compose exec backend sh -c "pytest ."