Bot / Dockerfile
YYP0502's picture
Upload 10 files
ad2cbeb verified
Raw History Blame Contribute Delete
1.53 kB
FROM ghcr.io/home-assistant/home-assistant:stable
USER root
RUN apk add --no-cache git bash nginx \
&& git clone --depth 1 https://github.com/al-one/hass-xiaomi-miot.git /tmp/hass-xiaomi-miot \
&& mkdir -p /opt/ha-custom-components \
&& cp -a /tmp/hass-xiaomi-miot/custom_components/xiaomi_miot /opt/ha-custom-components/xiaomi_miot \
&& rm -rf /tmp/hass-xiaomi-miot \
&& python3 -m pip install --no-cache-dir --disable-pip-version-check huggingface_hub \
&& mkdir -p /data/home-assistant /config
# Pre-install the China-region Haier Smart Home custom integration.
RUN git clone --depth 1 https://github.com/sfairy/ha_haier.git /tmp/ha_haier \
&& mkdir -p /opt/ha-custom-components \
&& cp -a /tmp/ha_haier/custom_components/haier /opt/ha-custom-components/haier \
&& rm -rf /tmp/ha_haier
COPY mcp_server/requirements.txt /opt/mcp-server/requirements.txt
RUN python3 -m venv /opt/mcp-venv \
&& /opt/mcp-venv/bin/pip install --no-cache-dir -r /opt/mcp-server/requirements.txt
COPY mcp_server/server.py /opt/mcp-server/server.py
COPY nginx.conf /etc/nginx/nginx.conf
COPY mcp-proxy.conf /etc/nginx/mcp-proxy.conf
COPY scripts/run-space.py /usr/local/bin/run-space.py
COPY scripts/start-homeassistant /usr/local/bin/start-homeassistant
COPY scripts/backup-homeassistant.py /usr/local/bin/backup-homeassistant.py
RUN chmod +x /usr/local/bin/start-homeassistant
ENV HOME_ASSISTANT_CONFIG=/data/home-assistant
ENV PORT=7860
EXPOSE 7860
ENTRYPOINT ["/usr/local/bin/start-homeassistant"]