mirror of
https://github.com/mattintech/pyBTMCP.git
synced 2026-07-11 12:01:53 +00:00
31 lines
704 B
Docker
31 lines
704 B
Docker
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
# Install system dependencies
|
||
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
|
|
mosquitto \
|
||
|
|
mosquitto-clients \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
# Set working directory
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Copy requirements first for layer caching
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
# Copy application code
|
||
|
|
COPY src/ ./src/
|
||
|
|
COPY config/ ./config/
|
||
|
|
COPY entrypoint.sh .
|
||
|
|
|
||
|
|
RUN chmod +x entrypoint.sh
|
||
|
|
|
||
|
|
# Expose ports
|
||
|
|
# 1883 - MQTT broker (for ESP32 connections)
|
||
|
|
# 8000 - Web UI / REST API
|
||
|
|
EXPOSE 1883 8000
|
||
|
|
|
||
|
|
# MCP server runs as main process via entrypoint
|
||
|
|
# Mosquitto and API run as background processes
|
||
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|