- Extract WebSocket handlers from main.py into handlers.py - Add V3 feature docs (dealer rotation, dealing animation, round end reveal, column pair celebration, final turn urgency, opponent thinking, score tallying, card hover/selection, knock early drama, column pair indicator, swap animation improvements, draw source distinction, card value tooltips, active rules context, discard pile history, realistic card sounds) - Add V3 refactoring docs (ai.py, main.py/game.py, misc improvements) - Add installation guide with Docker, systemd, and nginx setup - Add helper scripts (install.sh, dev-server.sh, docker-build.sh) - Add animation flow diagrams documentation - Add test files for handlers, rooms, and V3 features - Add e2e test specs for V3 features - Update README with complete project structure and current tech stack - Update CLAUDE.md with full architecture tree and server layer descriptions - Update .env.example to reflect PostgreSQL (remove SQLite references) - Update .gitignore to exclude virtualenv files, .claude/, and .db files - Remove tracked virtualenv files (bin/, lib64, pyvenv.cfg) - Remove obsolete game_log.py (SQLite) and games.db Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Build Docker images for Golf Game
|
|
#
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
|
|
cd "$PROJECT_DIR"
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m'
|
|
|
|
IMAGE_NAME="${IMAGE_NAME:-golfgame}"
|
|
TAG="${TAG:-latest}"
|
|
|
|
echo -e "${BLUE}Building Golf Game Docker image...${NC}"
|
|
echo "Image: $IMAGE_NAME:$TAG"
|
|
echo ""
|
|
|
|
docker build -t "$IMAGE_NAME:$TAG" .
|
|
|
|
echo ""
|
|
echo -e "${GREEN}Build complete!${NC}"
|
|
echo ""
|
|
echo "To run with docker-compose (production):"
|
|
echo ""
|
|
echo " export DB_PASSWORD=your-secure-password"
|
|
echo " export SECRET_KEY=\$(python3 -c 'import secrets; print(secrets.token_hex(32))')"
|
|
echo " export ACME_EMAIL=your-email@example.com"
|
|
echo " export DOMAIN=your-domain.com"
|
|
echo " docker-compose -f docker-compose.prod.yml up -d"
|
|
echo ""
|
|
echo "To run standalone:"
|
|
echo ""
|
|
echo " docker run -d -p 8000:8000 \\"
|
|
echo " -e POSTGRES_URL=postgresql://user:pass@host:5432/golf \\"
|
|
echo " -e REDIS_URL=redis://host:6379 \\"
|
|
echo " -e SECRET_KEY=your-secret-key \\"
|
|
echo " $IMAGE_NAME:$TAG"
|