Spaces:
Sleeping
Sleeping
Commit ·
65d4295
1
Parent(s): c8d8fd0
Force production mode build and cache invalidation
Browse files- Add --mode production to Vite build to ensure import.meta.env.DEV is false
- Add timestamp comment to invalidate Docker cache
Co-Authored-By: Claude <noreply@anthropic.com>
2 unmodified lines34567820 unmodified lines29303132333435362 unmodified lines# Set noninteractive installationENV DEBIAN_FRONTEND=noninteractive# Install build dependenciesRUN apt-get update && apt-get install -y \curl \20 unmodified lines# Build jison parsers (required for the game) - use global tsx directlyRUN tsx tools/buildJisonParser.ts# Build frontend (generates dist folder)RUN cd app && npm run build# Build backend with esbuild (handles ESM imports without .js extensions)RUN esbuild backend/src/server.ts --bundle --platform=node --target=node20 --format=esm --outfile=backend/dist/server.js --external:express --external:socket.io --external:cors --external:dotenv --external:uuid2 unmodified lines34567891020 unmodified lines31323334353637382 unmodified lines# Set noninteractive installationENV DEBIAN_FRONTEND=noninteractive# Build timestamp to force cache invalidation: 2026-01-11T11:00# Install build dependenciesRUN apt-get update && apt-get install -y \curl \20 unmodified lines# Build jison parsers (required for the game) - use global tsx directlyRUN tsx tools/buildJisonParser.ts# Build frontend (generates dist folder) - explicitly set production modeRUN cd app && npm run build -- --mode production# Build backend with esbuild (handles ESM imports without .js extensions)RUN esbuild backend/src/server.ts --bundle --platform=node --target=node20 --format=esm --outfile=backend/dist/server.js --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
Dockerfile+4-2