58b4114159
Full-stack World Cup web app (1930–2026): - Next.js 16 + TailwindCSS 4 + GraphQL Yoga + Apollo Client 4 + Drizzle + PostgreSQL 16 - 23 tournaments synced from openfootball/worldcup.json (matches, goals, teams, stadiums, squads, standings) - Pages: home (live), groups, stats, history, search, /tournaments/[year], /teams/[slug], /players/[name] - Live match detection via isLive() + Apollo 60 s poll - pnpm with node-linker=hoisted for Docker compatibility - docker-compose.yml with Traefik labels (HTTPS redirect, TLS, security middleware) - docker-compose.dev.yml for local dev (DB only, port 5432 exposed) - Dockerfile: multi-stage pnpm build, standalone Next.js output, sync script bundled - .env.example with all required variables documented - Comprehensive README with local dev, deployment, schema, and GraphQL API reference Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
908 B
Docker
29 lines
908 B
Docker
FROM node:22-alpine AS base
|
|
RUN corepack enable && corepack prepare pnpm@10.28.0 --activate
|
|
WORKDIR /app
|
|
|
|
FROM base AS deps
|
|
COPY package.json pnpm-lock.yaml .npmrc ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
FROM base AS builder
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
FROM base AS runner
|
|
ENV NODE_ENV=production
|
|
RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/scripts ./scripts
|
|
COPY --from=builder /app/lib ./lib
|
|
COPY --from=builder /app/package.json ./package.json
|
|
COPY --from=builder /app/tsconfig.json ./tsconfig.json
|
|
USER nextjs
|
|
EXPOSE 3000
|
|
ENV PORT=3000 HOSTNAME="0.0.0.0"
|
|
CMD ["node", "server.js"]
|