diff --git a/templates/docker-entrypoint.ejs b/templates/docker-entrypoint.ejs index e49d326..d43d419 100755 --- a/templates/docker-entrypoint.ejs +++ b/templates/docker-entrypoint.ejs @@ -107,7 +107,7 @@ if (process.env.DATABASE_URL) { <%= tab(n) %>await exec('<%= npx %> prisma migrate deploy') <% } -%> <% if (prismaSeed && sqlite3 && (prismaFile || prismaEnv)) { -%> -<%= tab(n) %>if (newDb) await exec('npx prisma db seed') +<%= tab(n) %>if (newDb) await exec(<%- JSON.stringify(prismaSeed) %>) <% } -%> <% } -%> <% if (nextjsGeneration) { -%> diff --git a/test/base/windows/docker-entrypoint.js b/test/base/windows/docker-entrypoint.js index 0b7e348..f8d9700 100755 --- a/test/base/windows/docker-entrypoint.js +++ b/test/base/windows/docker-entrypoint.js @@ -12,7 +12,7 @@ const env = { ...process.env } const target = url.protocol === 'file:' && url.pathname const newDb = target && !fs.existsSync(target) await exec('npx prisma migrate deploy') - if (newDb) await exec('npx prisma db seed') + if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts") } // launch application diff --git a/test/frameworks/nuxt-prisma/docker-entrypoint.js b/test/frameworks/nuxt-prisma/docker-entrypoint.js index a638041..71459c5 100755 --- a/test/frameworks/nuxt-prisma/docker-entrypoint.js +++ b/test/frameworks/nuxt-prisma/docker-entrypoint.js @@ -23,7 +23,7 @@ const env = { ...process.env } // prepare database await exec('npx prisma migrate deploy') - if (newDb) await exec('npx prisma db seed') + if (newDb) await exec("node prisma/seed.js") } // launch application diff --git a/test/frameworks/remix-indie/docker-entrypoint.js b/test/frameworks/remix-indie/docker-entrypoint.js index 0b7e348..f8d9700 100755 --- a/test/frameworks/remix-indie/docker-entrypoint.js +++ b/test/frameworks/remix-indie/docker-entrypoint.js @@ -12,7 +12,7 @@ const env = { ...process.env } const target = url.protocol === 'file:' && url.pathname const newDb = target && !fs.existsSync(target) await exec('npx prisma migrate deploy') - if (newDb) await exec('npx prisma db seed') + if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts") } // launch application diff --git a/test/frameworks/svelte-prisma/docker-entrypoint.js b/test/frameworks/svelte-prisma/docker-entrypoint.js index 533caa3..eb57121 100755 --- a/test/frameworks/svelte-prisma/docker-entrypoint.js +++ b/test/frameworks/svelte-prisma/docker-entrypoint.js @@ -16,7 +16,7 @@ if (process.argv.slice(-2).join(' ') === 'node ./build/index.js') { // prepare database await exec('npx prisma migrate deploy') - if (newDb) await exec('npx prisma db seed') + if (newDb) await exec("tsx prisma/seed.ts") } // launch application