Fix Docker Prisma generate and country types

This commit is contained in:
2026-05-06 17:44:05 +03:30
parent df4afe8e07
commit 6491c48a98
2 changed files with 12 additions and 3 deletions

View File

@@ -13,13 +13,14 @@ ARG DATABASE_URL
ARG NEXTAUTH_URL
ENV DATABASE_URL=$DATABASE_URL
ENV NEXTAUTH_URL=$NEXTAUTH_URL
ENV NODE_ENV=development
ENV NEXT_TELEMETRY_DISABLED=1
ENV PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN for i in 1 2 3 4 5; do npx prisma generate && break || sleep 10; done
RUN for i in 1 2 3 4 5; do npx prisma generate && exit 0; sleep 10; done; exit 1
ENV NODE_ENV=production
RUN npm run build
RUN npm prune --omit=dev

View File

@@ -1,9 +1,17 @@
import { db } from "@/lib/db";
import type { Prisma } from "@prisma/client";
import Link from "next/link";
import CountryFlag from "@/components/CountryFlag";
type CountryWithAdminListData = Prisma.CountryGetPayload<{
include: {
group: true;
_count: { select: { players: true } };
};
}>;
export default async function AdminCountriesPage() {
const countries = await db.country.findMany({
const countries: CountryWithAdminListData[] = await db.country.findMany({
include: {
group: true,
_count: { select: { players: true } },