fix: seed에서 argon2 런타임 의존성 제거 (Docker Alpine 호환)
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user