后端重构

This commit is contained in:
eafonyang
2026-07-30 13:56:31 +08:00
parent 707d889514
commit f2bbaa6876
80 changed files with 4765 additions and 4288 deletions
+11 -4
View File
@@ -11,15 +11,22 @@ WORKDIR /app
# Create logs directory
RUN mkdir -p /app/logs
# Install dependencies
# Install dependencies (including devDependencies for build)
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm && pnpm install --frozen-lockfile --prod
RUN corepack enable pnpm && pnpm install --frozen-lockfile
# Copy application code
COPY tsconfig.json drizzle.config.ts ./
COPY src/ ./src/
# Build TypeScript → dist/
RUN pnpm build
# Remove devDependencies after build
RUN pnpm prune --prod
# Expose port
EXPOSE 8000
# Run the application
CMD ["node", "src/app.js"]
# Run the compiled application
CMD ["node", "--conditions", "@zod/source", "dist/app.js"]