Add Docker deployment support with registry integration

- Update Dockerfile to use pyproject.toml instead of requirements.txt
- Add support for Docker Hub image pulling in compose files
- Add comprehensive deployment documentation with multiple methods
- Create CLAUDE.md with development and architecture guide
- Add .dockerignore for optimized build context
- Update .env.example with Docker configuration variables
- Configure 24-hour monitoring interval by default

Changes:
- Dockerfile: Install from pyproject.toml, use main.py entry point
- docker-compose.yml: Add image option for registry deployment
- docker-compose.prod.yml: Add image option for VPS deployment
- README.md: Add Docker Hub push/pull workflows and examples
- CLAUDE.md: Comprehensive guide for AI assistants and developers
- .dockerignore: Exclude unnecessary files from Docker builds
- .env.example: Add DOCKER_USERNAME and IMAGE_TAG variables
This commit is contained in:
Claude 2025-11-29 04:53:07 +00:00
parent 0236ef23d8
commit 9c5ac820b6
No known key found for this signature in database
7 changed files with 529 additions and 11 deletions

View file

@ -7,6 +7,7 @@ WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
@ -16,14 +17,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install uv for faster package installation
RUN pip install --no-cache-dir uv
# Copy requirements first for better caching
COPY requirements.txt .
# Copy only dependency files for better layer caching
COPY pyproject.toml .
# Install Python dependencies
RUN uv pip install --system --no-cache -r requirements.txt
# Install Python dependencies from pyproject.toml
RUN uv pip install --system --no-cache -e .
# Copy application code
COPY server.py .
# Copy application source code
COPY src/ ./src/
# Create data directory for schema cache
RUN mkdir -p /app/data/schemas
# Expose the port
EXPOSE 8000
@ -32,5 +36,5 @@ EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Run the server
CMD ["python", "server.py"]
# Run the server using the installed package entry point
CMD ["python", "-m", "geoguessr_mcp.main"]