fix: docker build and prisma orm database push

This commit is contained in:
Manuel
2023-08-29 21:19:36 +02:00
parent ab2e827270
commit aee541b6dc
3 changed files with 6 additions and 3 deletions

View File

@@ -1,8 +1,6 @@
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
RUN npm i -g prisma
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV production ENV NODE_ENV production
ENV NODE_OPTIONS '--no-experimental-fetch' ENV NODE_OPTIONS '--no-experimental-fetch'
@@ -10,6 +8,7 @@ ENV NODE_OPTIONS '--no-experimental-fetch'
COPY next.config.js ./ COPY next.config.js ./
COPY public ./public COPY public ./public
COPY package.json ./package.json COPY package.json ./package.json
COPY yarn.lock ./yarn.lock
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # 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 COPY ./scripts/run.sh ./scripts/run.sh
RUN yarn global add prisma
RUN which prisma
EXPOSE 7575 EXPOSE 7575
ENV PORT 7575 ENV PORT 7575

1
next-env.d.ts vendored
View File

@@ -1,5 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information. // see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -23,7 +23,7 @@
"test:run": "vitest run", "test:run": "vitest run",
"test:coverage": "vitest run --coverage", "test:coverage": "vitest run --coverage",
"docker:build": "turbo build && docker build . -t homarr:dev", "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" "postinstall": "prisma generate"
}, },
"dependencies": { "dependencies": {