Add health check endpoint and update Docker Compose configuration
- Add HealthCheckView to authapp - Update authapp/urls.py to include health check - Update docker-compose.yml for backend services - Add frontend service to docker-compose.yml - Add external config for frontend
This commit is contained in:
@@ -4,7 +4,7 @@ from rest_framework.authtoken.views import ObtainAuthToken
|
||||
from rest_framework.authtoken.models import Token
|
||||
from rest_framework.response import Response
|
||||
from .serializers import UserSerializer
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.permissions import IsAuthenticated, AllowAny
|
||||
from rest_framework import status
|
||||
|
||||
from django.http import JsonResponse
|
||||
@@ -42,3 +42,7 @@ class VerifyTokenView(APIView):
|
||||
}, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
class HealthCheckView(APIView):
|
||||
permission_classes = [AllowAny]
|
||||
def get(self, request, *args, **kwargs):
|
||||
return Response({"status": "healthy"})
|
Reference in New Issue
Block a user