1.1 KiB
1.1 KiB
Docker Containerization and Build Fixes
Objectives
- Create a Dockerfile to package the application as a monolith (Node.js + React).
- Fix TypeScript build errors preventing successful compilation.
- Verify the build process.
Changes
- Dockerfile: Created multi-stage build using
node:20-alpine.- Installs dependencies.
- Builds frontend.
- Prunes dev dependencies.
- Server Entry (
src/server/index.ts): Added logic to serve staticdistfiles and handle client-side routing in production. - Package.json: Moved
tsxto dependencies and updatedstartscript. - Code Fixes: Removed unused variables in client and server code used to satisfy strict TypeScript rules:
DeckBuilderView.tsx: Removed unusedpayload.DraftView.tsx: Removed unusedCardComponent.GameView.tsx: Removed unusedmyCommand,oppGraveyard.DraftManager.ts: Removed unusednumPlayers,cardIndex.GameManager.ts: Renamed unused args inshuffleLibrary.
Status
- Docker build successful (
docker build -t mtg-draft-maker .). - Image ready for deployment.