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
|
||||
ARG FROM_TAG=v4.4-3.4.0
|
||||
FROM ghcr.io/netbox-community/netbox:${FROM_TAG}
|
||||
FROM docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0}
|
||||
|
||||
# Für Plugin-Install: kurz root werden
|
||||
# falls du Dateien kopieren/collectstatic brauchst, kurz 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)
|
||||
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
|
||||
# 1) Plugin-Requirements ins Image legen
|
||||
# (Datei kannst du weiter "requirements-plugins.txt" nennen)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,12 +1,47 @@
|
|||
|
||||
x-netbox-image: &netbox_image netboxplugins:local
|
||||
|
||||
services:
|
||||
netbox:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-plugins
|
||||
image: netbox-plugins:v4.4-3.4.0
|
||||
restart: unless-stopped
|
||||
args:
|
||||
FROM_TAG: v4.4-3
|
||||
image: *netbox_image
|
||||
pull_policy: never
|
||||
ports:
|
||||
- "8000:8080"
|
||||
restart: unless-stopped
|
||||
|
||||
netbox-worker:
|
||||
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