fix: auto repair bugs #23
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m59s

This commit is contained in:
repair-agent 2026-02-24 14:53:05 +08:00
parent d2af1ddaa9
commit 47be0781ac
5 changed files with 65 additions and 1 deletions

24
.dockerignore Normal file
View File

@ -0,0 +1,24 @@
.git
.gitignore
.env
.env.example
.vscode
.idea
venv/
.venv/
__pycache__/
*.pyc
*.pyo
*.egg-info/
dist/
build/
*.log
*.sqlite3
media/
staticfiles/
.DS_Store
k8s/
.gitea/
docs/
CLAUDE.md
README.md

View File

@ -28,4 +28,4 @@ COPY . /app/
EXPOSE 8000
# Run entrypoint
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "config.wsgi:application"]
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "config.wsgi:application"]

View File

@ -7,8 +7,13 @@ URL configuration for RTC_DEMO project.
"""
from django.contrib import admin
from django.urls import path, include
from django.http import JsonResponse
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView, SpectacularRedocView
def health_check(request):
return JsonResponse({"status": "ok"})
# ============ App端路由 (普通用户,手机一键登录) ============
app_api_patterns = [
path('', include('apps.users.urls')),
@ -37,6 +42,9 @@ admin_api_patterns = [
]
urlpatterns = [
# Health check (no auth, for K8s probes)
path('healthz/', health_check),
# Django Admin
path('django-admin/', admin.site.urls),

View File

@ -68,6 +68,22 @@ spec:
value: "https://qiyuan-log-center-api.airlabs.art"
- name: LOG_CENTER_ENABLED
value: "true"
livenessProbe:
httpGet:
path: /healthz/
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /healthz/
port: 8000
initialDelaySeconds: 15
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
memory: "256Mi"

View File

@ -76,6 +76,22 @@ spec:
value: "https://qiyuan-log-center-api.airlabs.art"
- name: LOG_CENTER_ENABLED
value: "true"
livenessProbe:
httpGet:
path: /healthz/
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /healthz/
port: 8000
initialDelaySeconds: 15
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
memory: "256Mi"