diff --git a/backend/.env.production b/backend/.env.production index c2df3bdc..e6c07434 100644 --- a/backend/.env.production +++ b/backend/.env.production @@ -16,4 +16,4 @@ ASTOCK_ADMIN_USERNAME=admin ASTOCK_ADMIN_PASSWORD=替换为一个安全密码 # 前端地址(用于 CORS) -ASTOCK_FRONTEND_URL=http://your-server-ip:3001 +ASTOCK_FRONTEND_URL=http://your-server-ip:3002 diff --git a/backend/app/__pycache__/config.cpython-313.pyc b/backend/app/__pycache__/config.cpython-313.pyc index 025225b2..cdbe8354 100644 Binary files a/backend/app/__pycache__/config.cpython-313.pyc and b/backend/app/__pycache__/config.cpython-313.pyc differ diff --git a/backend/app/__pycache__/main.cpython-313.pyc b/backend/app/__pycache__/main.cpython-313.pyc index 5865aea8..eeb72ceb 100644 Binary files a/backend/app/__pycache__/main.cpython-313.pyc and b/backend/app/__pycache__/main.cpython-313.pyc differ diff --git a/backend/app/config.py b/backend/app/config.py index 30d2d297..7e8b3172 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -51,7 +51,7 @@ class Settings(BaseSettings): llm_temperature: float = 0.3 # 前端 - frontend_url: str = "http://localhost:3001" + frontend_url: str = "http://localhost:3002" # JWT 认证 jwt_secret: str = "change-me-in-production" diff --git a/backend/app/main.py b/backend/app/main.py index b37298fc..02109139 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -67,7 +67,7 @@ app = FastAPI( # CORS app.add_middleware( CORSMiddleware, - allow_origins=[settings.frontend_url, "http://localhost:3001"], + allow_origins=[settings.frontend_url, "http://localhost:3002"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/docker-compose.yml b/docker-compose.yml index 668e6621..c13a43dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: - BACKEND_URL=http://backend:8000 restart: unless-stopped ports: - - "3001:3001" + - "3002:3002" depends_on: - backend environment: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 0ff122f2..71af05e8 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -7,9 +7,9 @@ ENV NODE_ENV=production COPY .next/standalone ./ COPY .next/static ./.next/static -EXPOSE 3001 +EXPOSE 3002 -ENV PORT=3001 +ENV PORT=3002 ENV HOSTNAME="0.0.0.0" CMD ["node", "server.js"]