- Hero carousel: gallery.yaml hero accepts single UUID or array, crossfade component - Full-bleed single albums: subpages with 1 album skip grid, render photos directly - EXIF on hover: camera/lens/focal length overlay on grid items (toggle via exifOnHover) - Customizable grid: columns/gap/aspectRatio/layout (masonry|uniform) via gallery.yaml - Per-subpage grid overrides: each subpage can override global grid config - True masonry: per-image aspect ratios from EXIF dimensions - next/image migration: homepage hero, album covers, grid thumbnails, about portrait - ThumbHash blur placeholders and dominant color backgrounds - Custom next/image loader via image proxy with width/quality params - Lightbox fade-in transition with dominant color background - Password-protected subpages, health check, rate limiting, OG images
27 lines
717 B
TypeScript
27 lines
717 B
TypeScript
/**
|
|
* Health check endpoint — reports app and Immich connectivity status.
|
|
* Used by Docker HEALTHCHECK, monitoring tools, and load balancers.
|
|
*
|
|
* GET /api/health → { status, immich, uptime }
|
|
*/
|
|
|
|
import { NextResponse } from 'next/server';
|
|
import { immich } from '@/lib/immich';
|
|
|
|
const startTime = Date.now();
|
|
|
|
export async function GET() {
|
|
const immichOk = await immich.ping();
|
|
|
|
const body = {
|
|
status: immichOk ? 'ok' : 'degraded',
|
|
immich: immichOk ? 'connected' : 'unreachable',
|
|
uptime: Math.floor((Date.now() - startTime) / 1000),
|
|
};
|
|
|
|
return NextResponse.json(body, {
|
|
status: immichOk ? 200 : 503,
|
|
headers: { 'Cache-Control': 'no-store' },
|
|
});
|
|
}
|