mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
33 lines
728 B
Docker
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"]
|
|
|