1
This commit is contained in:
parent
adf3123ca4
commit
80ecc8d5ae
@ -16,4 +16,4 @@ ASTOCK_ADMIN_USERNAME=admin
|
|||||||
ASTOCK_ADMIN_PASSWORD=替换为一个安全密码
|
ASTOCK_ADMIN_PASSWORD=替换为一个安全密码
|
||||||
|
|
||||||
# 前端地址(用于 CORS)
|
# 前端地址(用于 CORS)
|
||||||
ASTOCK_FRONTEND_URL=http://your-server-ip:3001
|
ASTOCK_FRONTEND_URL=http://your-server-ip:3002
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -51,7 +51,7 @@ class Settings(BaseSettings):
|
|||||||
llm_temperature: float = 0.3
|
llm_temperature: float = 0.3
|
||||||
|
|
||||||
# 前端
|
# 前端
|
||||||
frontend_url: str = "http://localhost:3001"
|
frontend_url: str = "http://localhost:3002"
|
||||||
|
|
||||||
# JWT 认证
|
# JWT 认证
|
||||||
jwt_secret: str = "change-me-in-production"
|
jwt_secret: str = "change-me-in-production"
|
||||||
|
|||||||
@ -67,7 +67,7 @@ app = FastAPI(
|
|||||||
# CORS
|
# CORS
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=[settings.frontend_url, "http://localhost:3001"],
|
allow_origins=[settings.frontend_url, "http://localhost:3002"],
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|||||||
@ -19,7 +19,7 @@ services:
|
|||||||
- BACKEND_URL=http://backend:8000
|
- BACKEND_URL=http://backend:8000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3001:3001"
|
- "3002:3002"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -7,9 +7,9 @@ ENV NODE_ENV=production
|
|||||||
COPY .next/standalone ./
|
COPY .next/standalone ./
|
||||||
COPY .next/static ./.next/static
|
COPY .next/static ./.next/static
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3002
|
||||||
|
|
||||||
ENV PORT=3001
|
ENV PORT=3002
|
||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user