mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-22 08:16:54 +00:00
Refactor Dockerfile-plugins and docker-compose.override.yml to update image source, streamline build arguments, and enhance logging configurations for services.
This commit is contained in:
parent
ca50f1bbcd
commit
11c9b771be
|
|
@ -1,17 +1,18 @@
|
||||||
# Dockerfile-plugins
|
# Dockerfile-plugins
|
||||||
ARG FROM_TAG=v4.4-3.4.0
|
FROM docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0}
|
||||||
FROM ghcr.io/netbox-community/netbox:${FROM_TAG}
|
|
||||||
|
|
||||||
# Für Plugin-Install: kurz root werden
|
# falls du Dateien kopieren/collectstatic brauchst, kurz root:
|
||||||
USER root
|
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 ins Image installieren (ins NetBox-venv)
|
# 1) Plugin-Requirements ins Image legen
|
||||||
COPY requirements-plugins.txt /plugins/requirements-plugins.txt
|
# (Datei kannst du weiter "requirements-plugins.txt" nennen)
|
||||||
RUN /opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt
|
COPY requirements-plugins.txt /opt/netbox/plugin_requirements.txt
|
||||||
|
|
||||||
# Zurück zum default user
|
# 2) Plugins ins NetBox-venv installieren (nutzt das im Image vorhandene 'uv pip')
|
||||||
|
# 3) (optional aber empfehlenswert) Statics sammeln, falls Plugins welche mitbringen
|
||||||
|
RUN /usr/local/bin/uv pip install --no-cache-dir -r /opt/netbox/plugin_requirements.txt \
|
||||||
|
&& DEBUG="true" SECRET_KEY="dummyKeyWithMinimumLength-------------------------" \
|
||||||
|
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
||||||
|
|
||||||
|
# zurück zum Default-User
|
||||||
USER netbox
|
USER netbox
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,47 @@
|
||||||
|
|
||||||
|
x-netbox-image: &netbox_image netboxplugins:local
|
||||||
|
|
||||||
services:
|
services:
|
||||||
netbox:
|
netbox:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-plugins
|
dockerfile: Dockerfile-plugins
|
||||||
image: netbox-plugins:v4.4-3.4.0
|
args:
|
||||||
restart: unless-stopped
|
FROM_TAG: v4.4-3
|
||||||
|
image: *netbox_image
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- "8000:8080"
|
- "8000:8080"
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
netbox-worker:
|
netbox-worker:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
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