File size: 1,525 Bytes
f42e3d3
 
 
 
ad2cbeb
f42e3d3
 
f4039a1
f42e3d3
 
 
 
ad2cbeb
 
 
 
 
 
 
 
 
 
 
 
 
f42e3d3
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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"]