xiaozhi-esp32-server/main/live-agent-api/Dockerfile
2025-11-02 12:47:50 +08:00

33 lines
728 B
Docker

# Live Agent Dashboard API Dockerfile
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install uv
RUN pip install --no-cache-dir uv
# Copy project files
COPY pyproject.toml ./
COPY main.py ./
COPY config ./config
COPY models ./models
COPY schemas ./schemas
COPY router ./router
COPY services ./services
COPY utils ./utils
# Install dependencies using uv
RUN uv pip install --system -r pyproject.toml
# Expose port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:8080/health')" || exit 1
# Run application
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]