Hackathon-Phase-4 / Dockerfile
Claude Code - Backend Implementation Specialist
Deploy AI-powered Todo application to Hugging Face Spaces
f2b5c2a
raw
history blame contribute delete
579 Bytes
# Use Python 3.12 slim image as base
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Copy requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY src/ ./src/
COPY templates/ ./templates/
COPY alembic/ ./alembic/
COPY alembic.ini .
COPY init_db.py .
# Create directory for database
RUN mkdir -p /app/data
# Expose port 7860 (Hugging Face default) and 8000
EXPOSE 7860 8000
# Run the application
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]