0eabd604b0
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Change Dockerfile to use development build (better error messages)
- Add || {} fallbacks to all Object.values() calls accessing state
- Fixes "Cannot convert undefined or null to object" browser error during SSR/hydration
- Verified TypeScript compilation and Next.js build successful
Files modified:
- Dockerfile
- src/app/page.tsx
- src/components/game/tabs/StatsTab.tsx
- src/components/game/StatsTab/LoopStatsSection.tsx
- src/components/game/StatsTab/ElementStatsSection.tsx
- src/components/game/tabs/AttunementsTab.tsx
- src/components/game/tabs/GolemancyTab.tsx
- src/lib/game/effects.ts
- src/lib/game/utils/combat-utils.ts
- src/lib/game/crafting-loot.ts
- src/components/game/LootInventory/LootInventoryDisplay.tsx
- src/components/game/LootInventory/index.tsx
- src/components/game/crafting/EnchantmentDesigner/utils.ts
40 lines
1.0 KiB
Docker
Executable File
40 lines
1.0 KiB
Docker
Executable File
# Mana Loop - Next.js Game Docker Image (Development Build)
|
|
|
|
FROM node:20-alpine AS base
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
RUN apk add --no-cache libc6-compat openssl
|
|
|
|
# Install bun
|
|
RUN npm install -g bun
|
|
|
|
# Copy package files first for better caching
|
|
COPY package.json bun.lockb* ./
|
|
COPY prisma ./prisma/
|
|
|
|
# Install dependencies
|
|
RUN bun install --frozen-lockfile
|
|
|
|
# Copy the rest of the application
|
|
COPY . .
|
|
|
|
# Development environment variables (no production optimizations)
|
|
ENV NODE_ENV=development
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV DATABASE_URL="file:./dev.db"
|
|
ENV NEXT_DEV_MODE=true
|
|
|
|
# Generate Prisma client
|
|
RUN bunx prisma generate --schema=./prisma/schema.prisma
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Health check for development
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
|
|
|
|
# Use development server (next dev) for better error messages and HMR
|
|
CMD ["bun", "run", "dev", "--", "-p", "3000", "--", "--hostname", "0.0.0.0"]
|