mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-22 08:16:54 +00:00
Refactor Dockerfile-plugins to install python3-pip and update docker-compose.override.yml to streamline service definitions and remove unnecessary logging configurations
This commit is contained in:
parent
76282d222f
commit
61b453d4ee
|
|
@ -2,10 +2,16 @@
|
||||||
ARG FROM_TAG=v4.4-3
|
ARG FROM_TAG=v4.4-3
|
||||||
FROM ghcr.io/netbox-community/netbox:${FROM_TAG}-plugins
|
FROM ghcr.io/netbox-community/netbox:${FROM_TAG}-plugins
|
||||||
|
|
||||||
# pip ins venv bringen und upgraden
|
# Für Plugin-Install: kurz root werden
|
||||||
RUN /opt/netbox/venv/bin/python -m ensurepip && \
|
USER root
|
||||||
/opt/netbox/venv/bin/python -m pip install --upgrade pip
|
# 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
|
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
|
RUN /opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt
|
||||||
|
|
||||||
|
# Zurück zum default user
|
||||||
|
USER netbox
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
version: "3.9"
|
||||||
|
|
||||||
x-netbox-image: &netbox_image netboxplugins:local
|
x-netbox-image: &netbox_image netboxplugins:local
|
||||||
|
|
||||||
|
|
@ -14,34 +15,16 @@ services:
|
||||||
- "8000:8080"
|
- "8000:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
netbox-worker:
|
worker:
|
||||||
|
image: *netbox_image
|
||||||
|
pull_policy: never
|
||||||
restart: unless-stopped
|
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
|
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"
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue