mirror of
https://github.com/PeterMaquiran/tvone-api.git
synced 2026-04-23 10:03:15 +00:00
+3
-8
@@ -7,12 +7,10 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
|
|||||||
|
|
||||||
# Install deps
|
# Install deps
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
# Important: ensure prisma is installed
|
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# Copy Prisma schema specifically before generating
|
# Copy source
|
||||||
# Replace 'prisma/schema.prisma' with your actual path if different
|
COPY . .
|
||||||
COPY prisma ./prisma/
|
|
||||||
|
|
||||||
# Ensure env exists (optional safety for containers)
|
# Ensure env exists (optional safety for containers)
|
||||||
RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi
|
RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi
|
||||||
@@ -20,13 +18,10 @@ RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi
|
|||||||
# Generate Prisma Client for the Linux environment
|
# Generate Prisma Client for the Linux environment
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
# Copy the rest of the source
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build NestJS
|
# Build NestJS
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Using the path confirmed in your previous logs
|
# Change your CMD to this:
|
||||||
CMD ["node", "dist/src/main.js"]
|
CMD ["node", "dist/src/main.js"]
|
||||||
Reference in New Issue
Block a user