diff --git a/Dockerfile-plugins b/Dockerfile-plugins index 8c8f292..94ba192 100644 --- a/Dockerfile-plugins +++ b/Dockerfile-plugins @@ -2,10 +2,16 @@ ARG FROM_TAG=v4.4-3 FROM ghcr.io/netbox-community/netbox:${FROM_TAG}-plugins -# pip ins venv bringen und upgraden -RUN /opt/netbox/venv/bin/python -m ensurepip && \ - /opt/netbox/venv/bin/python -m pip install --upgrade pip +# Für Plugin-Install: kurz root werden +USER root +# Debian/Bookworm: ensurepip ist oft nicht im Image -> python3-pip nachinstallieren +RUN apt-get update \ + && apt-get install -y --no-install-recommends python3-pip \ + && rm -rf /var/lib/apt/lists/* -# Plugins beim Build installieren +# Plugins ins Image installieren (ins NetBox-venv) COPY requirements-plugins.txt /plugins/requirements-plugins.txt RUN /opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt + +# Zurück zum default user +USER netbox diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4078d36..b674aa2 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,3 +1,4 @@ +version: "3.9" x-netbox-image: &netbox_image netboxplugins:local @@ -14,34 +15,16 @@ services: - "8000:8080" restart: unless-stopped - netbox-worker: + worker: + image: *netbox_image + pull_policy: never restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "3" - postgres: + housekeeping: + image: *netbox_image + pull_policy: never + command: /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping + depends_on: + - postgres + - redis restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "20m" - max-file: "5" - - redis: - restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "20m" - max-file: "5" - - redis-cache: - restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "20m" - max-file: "5"