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:
@@ -17,6 +17,7 @@ The project has successfully migrated from a .NET backend to a Node.js Modular M
|
||||
- **[2025-12-14] Fix Draft Images**: Fixed image loading in Draft UI by adding proxy configuration and correcting property access. [Link](./devlog/2025-12-14-230000_fix_draft_images.md)
|
||||
- **[2025-12-14] Fix Submit Deck**: Implemented `player_ready` handler and state transition to auto-start game when deck is submitted. [Link](./devlog/2025-12-14-233000_fix_submit_deck.md)
|
||||
- **[2025-12-14] Fix Hooks & Waiting State**: Resolved React hook violation crash and added proper waiting screen for ready players. [Link](./devlog/2025-12-14-234500_fix_hooks_and_waiting_state.md)
|
||||
- **[2025-12-14] Docker Containerization**: Created Dockerfile, fixed build errors, and verified monolithic build. [Link](./devlog/2025-12-14-235700_docker_containerization.md)
|
||||
|
||||
## Active Modules
|
||||
1. **Cube Manager**: Fully functional (Parsing, Fetching, Pack Generation).
|
||||
|
||||
@@ -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