PrismaP
Prisma14mo ago
4 replies
aa55h

How to correctly deploy prisma into production?

So Im a bit clueless here, am I supposed to run
prisma generate
in my Dockerfile? Im using prisma with nextjs dockerfile and doing:
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN yarn prisma generate

with:
app:
    build:
      context: .
      args:
        - DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
    container_name: RiskRealm
    environment:
      - DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
    env_file:
      - .env.production
    depends_on:
      - db
    ports:
      - "3000:3000"

but im getting DATABASE_URL was not found, where could be the issue? or am i doing the whole thing wrong?
Was this page helpful?