fix: seed에서 argon2 런타임 의존성 제거 (Docker Alpine 호환)

This commit is contained in:
Johngreen
2026-03-09 00:26:04 +09:00
parent 7ce2bd23f8
commit 8ffad799e9
3 changed files with 10 additions and 6 deletions
+4 -2
View File
@@ -2,7 +2,9 @@ import { PrismaClient } from '@prisma/client';
import { readFileSync } from 'node:fs';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import argon2 from 'argon2';
// Pre-generated argon2 hash for admin password (avoids native compilation dependency in Docker Alpine)
const ADMIN_PASSWORD_HASH =
'$argon2id$v=19$m=65536,t=3,p=4$MMkWVs1hKzKPp5P93KLITw$fhiUqTZMkR0ucwQNteHskMn9UIrD/7aUXZPUdzWYloE';
const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -152,7 +154,7 @@ async function seedAdminUser(): Promise<void> {
return;
}
const passwordHash = await argon2.hash('admin123');
const passwordHash = ADMIN_PASSWORD_HASH;
const user = await prisma.user.create({
data: {