build: Add Docker containerization documentation and remove unused variables to resolve TypeScript errors.
All checks were successful
Build and Deploy / build (push) Successful in 1m14s
All checks were successful
Build and Deploy / build (push) Successful in 1m14s
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# 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 static `dist` files and handle client-side routing in production.
|
||||
- **Package.json**: Moved `tsx` to dependencies and updated `start` script.
|
||||
- **Code Fixes**: Removed unused variables in client and server code used to satisfy strict TypeScript rules:
|
||||
- `DeckBuilderView.tsx`: Removed unused `payload`.
|
||||
- `DraftView.tsx`: Removed unused `CardComponent`.
|
||||
- `GameView.tsx`: Removed unused `myCommand`, `oppGraveyard`.
|
||||
- `DraftManager.ts`: Removed unused `numPlayers`, `cardIndex`.
|
||||
- `GameManager.ts`: Renamed unused args in `shuffleLibrary`.
|
||||
|
||||
## Status
|
||||
- Docker build successful (`docker build -t mtg-draft-maker .`).
|
||||
- Image ready for deployment.
|
||||
Reference in New Issue
Block a user