From aee541b6dc046aecdbf97944800912b6cc7ff0e6 Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 29 Aug 2023 21:19:36 +0200 Subject: [PATCH] fix: docker build and prisma orm database push --- Dockerfile | 6 ++++-- next-env.d.ts | 1 + package.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4eae4f894..ab08b3a0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ FROM node:20-alpine WORKDIR /app -RUN npm i -g prisma - ENV NEXT_TELEMETRY_DISABLED 1 ENV NODE_ENV production ENV NODE_OPTIONS '--no-experimental-fetch' @@ -10,6 +8,7 @@ ENV NODE_OPTIONS '--no-experimental-fetch' COPY next.config.js ./ COPY public ./public COPY package.json ./package.json +COPY yarn.lock ./yarn.lock # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing @@ -20,6 +19,9 @@ COPY prisma/schema.prisma prisma/schema.prisma COPY ./scripts/run.sh ./scripts/run.sh +RUN yarn global add prisma +RUN which prisma + EXPOSE 7575 ENV PORT 7575 diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03dc..fd36f9494 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/package.json b/package.json index a26e251e6..19f46592b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test:run": "vitest run", "test:coverage": "vitest run --coverage", "docker:build": "turbo build && docker build . -t homarr:dev", - "docker:start": "docker run --env-file ./.env -p 7575:7575 homarr:dev ", + "docker:start": "docker run -p 7575:7575 homarr:dev ", "postinstall": "prisma generate" }, "dependencies": {