重构后端,改为 node 技术栈

This commit is contained in:
eafonyang
2026-06-09 16:36:23 +08:00
parent abab985769
commit e4e6529577
59 changed files with 4901 additions and 1916 deletions
+6 -5
View File
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM node:20-alpine
WORKDIR /app
@@ -6,14 +6,15 @@ WORKDIR /app
RUN mkdir -p /app/logs
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm && pnpm install --frozen-lockfile --prod
# Copy application code
COPY . .
COPY src/ ./src/
COPY .env ./
# Expose port
EXPOSE 8000
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["node", "src/app.js"]