d6e094bbb5
The UPS plugin's default driver was snmp-ups, so NUT was just translating network SNMP back into its own protocol — no value over polling the UPS directly through the existing snmp plugin. The managed-NUT entrypoint path also broke container startup when config was incomplete. Deletes nut_setup.py, the NUT block from entrypoint.sh, NUT packages from the Dockerfile, the ups entry from the plugin catalog example, and the ups wiring in alerts METRIC_CATALOG, widgets, settings routes, and the rules form. The plugins/ups source tree (untracked) is also removed from the working copy. Existing ups_* DB tables are orphaned but harmless in dev; a drop migration isn't needed. Follow-up: rebuild "on battery → Ansible shutdown" automation on top of the alerts system as a new action type that runs a playbook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
982 B
Docker
34 lines
982 B
Docker
FROM python:3.13-slim
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
iputils-ping \
|
|
# gosu — minimal privilege-drop tool used by entrypoint.sh
|
|
gosu \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Upgrade pip to suppress the version notice
|
|
RUN pip install --upgrade pip
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml .
|
|
COPY roundtable/ roundtable/
|
|
RUN pip install --no-cache-dir .
|
|
|
|
COPY alembic.ini .
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Runtime directories — owned by app user. The container starts as root
|
|
# so the entrypoint can fix up /data permissions if needed, then drops to
|
|
# 'app' (uid 1000) via gosu before launching roundtable.
|
|
RUN useradd -m -u 1000 app \
|
|
&& mkdir -p /data/playbook_cache /data/plugins \
|
|
&& chown -R app:app /data /app
|
|
|
|
EXPOSE 5000
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["roundtable", "--host", "0.0.0.0", "--port", "5000"]
|