Externalize hardcoded host inventory and diagram topology into JSON config files (hosts.json, diagram.json) loaded at runtime. Add .env for configurable port, SSH key path, and refresh interval. Include example configs and README for standalone deployment. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
593 B
Docker
14 lines
593 B
Docker
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
RUN apt-get update && apt-get install -y --no-install-recommends openssh-client gosu && rm -rf /var/lib/apt/lists/*
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY app.py .
|
|
COPY templates/ templates/
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN mkdir -p /app/ssh /app/config && chmod 700 /app/ssh
|
|
RUN useradd -m -s /bin/bash dashboard && chown -R dashboard:dashboard /app
|
|
RUN chmod +x /entrypoint.sh
|
|
ENV PYTHONUNBUFFERED=1 REFRESH_INTERVAL=60 SSH_TIMEOUT=10 SSH_KEY_PATH=/app/ssh/id_ed25519
|
|
EXPOSE 5000
|
|
ENTRYPOINT ["/entrypoint.sh"]
|