update django port

This commit is contained in:
2026-04-06 18:55:48 +08:00
parent d141313a24
commit f754f6a275
5 changed files with 7 additions and 4 deletions

0
.env Normal file
View File

View File

@@ -7,7 +7,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt \
--default-timeout=100 \
-i https://pypi.tuna.tsinghua.edu.cn/simple
COPY . .

View File

@@ -7,7 +7,7 @@ services:
env_file:
- .env
ports:
- "${DJANGO_PORT:-8000}:${DJANGO_PORT:-8000}"
- "${DJANGO_PORT:-6789}:${DJANGO_PORT:-8000}"
volumes:
- static_volume:/app/staticfiles
- jsonl_archive:/app/archive

View File

@@ -4,6 +4,7 @@ import sys
def main():
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "src"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
try:
from django.core.management import execute_from_command_line

View File

@@ -205,9 +205,9 @@ def parse_jsonl(file_path):
msg_data = {
"session_id": session_id,
"message_id": msg_id,
"parent_id": parent_id,
"parent_id": parent_id or "",
"seq": message_seq,
"role": role,
"role": role or "",
"content_text": content_text,
"raw_content": content_items if content_items else [],
"raw_message": event.get("content", []),