fix build
Some checks failed
Build and Push App / build (push) Failing after 21s

This commit is contained in:
2026-04-15 22:18:13 +02:00
parent d8a6d43ae1
commit fae94ed8b1
3 changed files with 19 additions and 5 deletions

13
.dockerignore Normal file
View File

@@ -0,0 +1,13 @@
node_modules
.next
.git
.gitea
*.log
npm-debug.log*
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
dist
build

View File

@@ -19,14 +19,14 @@ COPY . .
# Generate Prisma Client # Generate Prisma Client
RUN DATABASE_URL="postgresql://dummy:dummy@localhost:5432/dummy" DEBUG=prisma:* npx prisma generate --schema=prisma/schema.prisma RUN DATABASE_URL="postgresql://dummy:dummy@localhost:5432/dummy" DEBUG=prisma:* npx prisma generate --schema=prisma/schema.prisma
# Build Next.js # Clear any existing build artifacts and build
RUN npm run build RUN rm -rf .next && npm run build
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser --system --uid 1001 nextjs
@@ -46,8 +46,8 @@ USER nextjs
EXPOSE 3000 EXPOSE 3000
ENV PORT 3000 ENV PORT=3000
ENV HOSTNAME "0.0.0.0" ENV HOSTNAME="0.0.0.0"
# Run migrations and start the server # Run migrations and start the server
CMD ["sh", "-c", "npx prisma db push && node server.js"] CMD ["sh", "-c", "npx prisma db push && node server.js"]

View File

@@ -1,3 +1,4 @@
// Force refresh for Next.js 16 params fix
import { NextRequest, NextResponse } from 'next/server'; import { NextRequest, NextResponse } from 'next/server';
import prisma from '../../../../../lib/prisma'; import prisma from '../../../../../lib/prisma';