Phase 0 foundation: - Docker Compose with PostgreSQL, Redis, Hardhat node - RPSArena.sol commit-reveal smart contract with tests - Node.js + Socket.io server with matchmaking and match state machine - Next.js + Phaser 3 frontend with Boot, Lobby, Arena, Result scenes - Nginx Proxy Manager integration planned for jeu.cosmolan.fr Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
380 B
Docker
16 lines
380 B
Docker
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
RUN apk add --no-cache git
|
|
COPY package.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
COPY --from=builder /app/.next/standalone ./
|
|
COPY --from=builder /app/.next/static ./.next/static
|
|
COPY --from=builder /app/public ./public
|
|
EXPOSE 3000
|
|
CMD ["node", "server.js"]
|