Deploy: fix /api/health + deploy script Next.js detection
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
This commit is contained in:
@ -90,7 +90,7 @@ Login: POST /api/v1/auth/login
|
|||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
For API issues, contact support@pounce.ch
|
For API issues, contact hello@pounce.ch
|
||||||
""",
|
""",
|
||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
@ -168,6 +168,22 @@ async def health_check():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/api/health")
|
||||||
|
async def health_check_api():
|
||||||
|
"""
|
||||||
|
Health check behind Nginx `/api` proxy.
|
||||||
|
|
||||||
|
Nginx routes `/api/*` to the backend, so `https://pounce.ch/api/health` must exist.
|
||||||
|
"""
|
||||||
|
return await health_check()
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/api/v1/health")
|
||||||
|
async def health_check_api_v1():
|
||||||
|
"""Health check behind `/api/v1` prefix (convenience)."""
|
||||||
|
return await health_check()
|
||||||
|
|
||||||
|
|
||||||
# Rate-limited endpoints - apply specific limits to sensitive routes
|
# Rate-limited endpoints - apply specific limits to sensitive routes
|
||||||
from fastapi import Depends
|
from fastapi import Depends
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ if ! $BACKEND_ONLY; then
|
|||||||
|
|
||||||
if [ $BUILD_EXIT -eq 0 ]; then
|
if [ $BUILD_EXIT -eq 0 ]; then
|
||||||
# Gracefully restart Next.js
|
# Gracefully restart Next.js
|
||||||
NEXT_PID=$(pgrep -f 'next start' | awk 'NR==1{print; exit}')
|
NEXT_PID=$(pgrep -af 'next-serv|next start' | awk 'NR==1{print $1; exit}')
|
||||||
|
|
||||||
if [ -n "$NEXT_PID" ]; then
|
if [ -n "$NEXT_PID" ]; then
|
||||||
echo " Restarting Next.js (PID: $NEXT_PID)..."
|
echo " Restarting Next.js (PID: $NEXT_PID)..."
|
||||||
@ -173,7 +173,7 @@ if ! $BACKEND_ONLY; then
|
|||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# Verify
|
# Verify
|
||||||
NEW_PID=$(pgrep -f 'next start' | awk 'NR==1{print; exit}')
|
NEW_PID=$(pgrep -af 'next-serv|next start' | awk 'NR==1{print $1; exit}')
|
||||||
if [ -n "$NEW_PID" ]; then
|
if [ -n "$NEW_PID" ]; then
|
||||||
echo " ✓ Frontend running (PID: $NEW_PID)"
|
echo " ✓ Frontend running (PID: $NEW_PID)"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user