diff --git a/backend/Dockerfile b/backend/Dockerfile index b47c71d..6a1871f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -37,9 +37,6 @@ USER nodejs EXPOSE 3001 RUN npx prisma generate -# 健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:3001/health || exit 1 # 启动命令 CMD [ "sh", "-c", "npm run db:push && npm run db:seed && npm run start" ] \ No newline at end of file diff --git a/backend/src/index.ts b/backend/src/index.ts index b83f8e2..5472516 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -47,9 +47,6 @@ app.use(express.urlencoded({ extended: true })); // Request logging app.use((req, res, next) => { - if (req.path === '/health') { - return next(); - } logger.info(`${req.method} ${req.path}`, { ip: req.ip, userAgent: req.get('User-Agent') @@ -57,15 +54,6 @@ app.use((req, res, next) => { next(); }); -// Health check endpoint -app.get('/health', (req, res) => { - res.json({ - status: 'OK', - timestamp: new Date().toISOString(), - uptime: process.uptime() - }); -}); - // API routes app.use('/api/auth', authRoutes); app.use('/api/users', userRoutes);