From 3f829df005c13fe9eae7d9f8d9534225eea5e439 Mon Sep 17 00:00:00 2001 From: Leticia Dias Date: Wed, 30 Jul 2025 14:58:12 -0300 Subject: [PATCH] feat: added command to run migrations in production --- Dockerfile | 3 +++ prisma/schema.prisma | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ad83e7..4fabf7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ COPY . . # Run prisma client generator RUN npx prisma generate +# Roda as migrations no ambiente de produção +RUN npx prisma migrate deploy + # Build the NestJS application RUN npm run build diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 0b98adf..a1a5150 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -13,7 +13,7 @@ generator client { datasource db { provider = "postgres" - url = env("DATABASE_URL") + url = env("URL_DATABASE") } model User {