fix: Chrome launch on Coolify and add dependencies

This commit is contained in:
2026-06-10 13:29:48 +03:00
parent c58c2b837c
commit 60626ccd51
3 changed files with 15 additions and 4 deletions
+5 -2
View File
@@ -26,9 +26,12 @@ WORKDIR /app
RUN apk add --no-cache \
postgresql-client \
chromium \
nss \
freetype \
fontconfig \
ttf-freefont
harfbuzz \
ca-certificates \
ttf-freefont \
fontconfig
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
+5
View File
@@ -0,0 +1,5 @@
[phases.setup]
nixPkgs = ["...", "chromium", "nss", "freetype", "harfbuzz"]
[variables]
CHROME_PATH = "/usr/bin/chromium"
+5 -2
View File
@@ -128,9 +128,12 @@ export async function GET(request: NextRequest) {
} catch (error: any) {
console.error('Lighthouse hatası:', error)
return NextResponse.json(
{ error: error.message.includes('zaman aşımı')
{
error: error.message.includes('zaman aşımı')
? 'Analiz zaman aşımına uğradı, lütfen tekrar deneyin.'
: 'Analiz sırasında hata oluştu. Sunucuda Chrome yüklü olduğundan emin olun.' },
: 'Analiz sırasında hata oluştu. Sunucuda Chrome yüklü olduğundan emin olun.',
details: error?.message || String(error)
},
{ status: 500 }
)
} finally {