fhenriquez
fhenriquez
PPrisma
Created by fhenriquez on 1/21/2025 in #help-and-questions
Issue with seeding in Next.js + Prisma + Docker + SQLite
does not work
9 replies
PPrisma
Created by fhenriquez on 1/21/2025 in #help-and-questions
Issue with seeding in Next.js + Prisma + Docker + SQLite
client: import { PrismaClient } from '@prisma/client' const globalForPrisma = globalThis as unknown as { prisma: PrismaClient } export const prisma = globalForPrisma.prisma || new PrismaClient() if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma export default prisma
9 replies
PPrisma
Created by fhenriquez on 1/21/2025 in #help-and-questions
Issue with seeding in Next.js + Prisma + Docker + SQLite
COPY package*.json ./ COPY ./prisma prisma ENV DATABASE_URL="file:./dev.db" ENV NODE_ENV="production" # # init prisma RUN npx prisma generate --schema=./prisma/schema.prisma RUN npx prisma migrate deploy # install dependencies RUN npm install # copy the rest of the files to the working directory COPY . . EXPOSE 4444 EXPOSE 5555 CMD npm run build && npm run start
9 replies