feat: adicionar healthcheck no frontend para evitar bad gateway

This commit is contained in:
Erik
2025-11-27 14:02:37 -03:00
parent ad16a50008
commit 2db3873ee7
2 changed files with 11 additions and 0 deletions

View File

@@ -41,6 +41,12 @@ services:
container_name: occto_frontend_dev
expose:
- "3000"
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://admin:adminpassword@postgres_dev:5432/occto_db_dev?schema=public

View File

@@ -0,0 +1,5 @@
import { NextResponse } from 'next/server';
export async function GET() {
return NextResponse.json({ status: 'ok', timestamp: new Date().toISOString() });
}