All the Five services Postgres, Web, Celery Worker, Celery Beat and Redis are containerized.
- Run "docker-compose build".
- Run "docker-compose up".
- After your services are up you will have to run migrations, so run the command "docker exec -it app_web_1 python manage.py migrate".
Register API's
-
Writer Register API, Endpoint: api/v1/register/writer/ payload: {
"email": "test@test.com", "password": "testing", "first_name": "test",#Optional "last_name": "test"#Optional
}
-
Editor Register API,
Endpoint: api/v1/register/editor/ method: POST
payload: {
"email": "test@test.com",
"password": "testing",
"first_name": "test",#Optional
"last_name": "test"#Optional
} -
Get Token API, (I have used JWT token authentication)
method: POST
Endpoint : api/v1/auth/token/obtain/
payload : {
"email": "test@test.com",
"password": "testing"
} -
Article API,
method: POST
endpoint: api/v1/publication/article/
Headers: {"Authorization": "JWT {JWT_TOKEN}"}
payload: {"name": "Coronavirus Pandemic", "status": "in_progress", "google_doc_link": "www.test.com"} # status and google doc link are optionalmethod: Patch
payload: Any Field on Article Model
The cronjob will run every five seconds and chec fo open articles with google doc link and mark them in review.
SSH link is also added