Add Docker-based production deployment

- Multi-stage Dockerfile with Node builder and nginx server
- Nginx configuration with gzip, security headers, and caching
- Docker Compose setup with health checks
- Updated README with deployment instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2025-12-16 23:34:05 +01:00
parent 09fd0629af
commit 0064773eaa
5 changed files with 168 additions and 0 deletions

View File

@@ -26,6 +26,48 @@ npm run build
The built files will be in the `dist/` directory.
## Docker Deployment
### Using Docker Compose (Recommended)
```bash
# Build and start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose down
```
The game will be available at `http://localhost:8080`
### Using Docker directly
```bash
# Build the image
docker build -t whalehunting-game .
# Run the container
docker run -d -p 8080:80 --name whalehunting whalehunting-game
# View logs
docker logs -f whalehunting
# Stop and remove container
docker stop whalehunting
docker rm whalehunting
```
### Production Deployment Notes
- The Docker image uses nginx to serve static files
- Includes gzip compression for better performance
- Health checks are configured for container monitoring
- Security headers are enabled
- Static assets are cached for 1 year
## Project Structure
```