Files
Michess/Dockerfile
Kroonk 5e996f791e
Some checks failed
Build & Push Docker Image to Gitea Registry / build-and-push (push) Failing after 6s
Fix auth modal feedback and production deploy config
2026-05-20 17:25:15 +02:00

30 lines
792 B
Docker

FROM node:lts-bookworm-slim
# Install git and stockfish (native binary)
RUN apt-get update && apt-get install -y --no-install-recommends git stockfish && rm -rf /var/lib/apt/lists/*
ENV PNPM_HOME=/usr/local/bin
WORKDIR /opt/michess/
COPY . .
RUN corepack enable && \
corepack prepare pnpm@9.15.9 --activate && \
pnpm config set store-dir /opt/michess/.pnpm-store && \
pnpm install --no-frozen-lockfile
# Build-time env vars for Next.js (baked into the frontend bundle)
ARG NEXT_PUBLIC_API_URL=http://localhost:3001
ARG NEXT_PUBLIC_APP_URL=http://localhost:3000
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
# Build server and client
RUN pnpm build:server && pnpm build:client
EXPOSE 3000 3001
ENTRYPOINT ["pnpm"]
CMD ["start"]