# ---- Base image ----
FROM python:3.12-slim

WORKDIR /app

# ---- Copy app files ----
COPY monitor.py .
COPY dashboard.html .
COPY entrypoint.sh .

RUN chmod +x entrypoint.sh

# ---- Expose the dashboard port ----
EXPOSE 8080

# ---- Run monitor.py in the background + serve dashboard.html on 8080 ----
CMD ["./entrypoint.sh"]
