Vorbereitung für Session B (Deploy auf DS923). Datei-Set reicht für Image-Build ohne weitere Quellen aus dem Repo: - Dockerfile: python:3.12-slim, mountbares /config ohne .env-COPY - requirements.txt: mcp[cli]>=1.0, starlette>=0.36 (StreamableHTTP) - BUILD.md: rsync → docker build → Portainer-Container-Deploy - .gitignore: .env (Schema-Vorlage lokal) + __pycache__ ausklammern Die Live-Instanz .env und der Container selbst werden in Session B gebaut, nicht hier. Kein Secret in Git.
16 lines
242 B
Docker
16 lines
242 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY server.py discover.py ./
|
|
|
|
EXPOSE 3030
|
|
|
|
ENV SHELLY_MCP_HOST=0.0.0.0 \
|
|
SHELLY_MCP_PORT=3030
|
|
|
|
CMD ["python3", "server.py"]
|