Refactor netbox service in docker-compose.override.yml to include build context and Dockerfile, and remove unnecessary logging configuration

This commit is contained in:
bboerni2 2025-09-23 16:59:45 +02:00
parent 4ae3ab6350
commit c11718fce1
2 changed files with 17 additions and 10 deletions

11
Dockerfile-plugins Normal file
View file

@ -0,0 +1,11 @@
# Dockerfile-plugins
ARG FROM_TAG=v4.4-3
FROM ghcr.io/netbox-community/netbox:${FROM_TAG}-plugins
# Systemabhängigkeit: pip ins venv holen
RUN python -m ensurepip && \
/opt/netbox/venv/bin/python -m pip install --upgrade pip
# Plugins installieren
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

View file

@ -1,18 +1,14 @@
services: services:
netbox: netbox:
build:
context: .
dockerfile: Dockerfile-plugins
args:
FROM_TAG: v4.4-3
image: bboerni2/netbox:v4.4-3-plugins
ports: ports:
- "8000:8080" - "8000:8080"
restart: unless-stopped restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- ./requirements-plugins.txt:/plugins/requirements-plugins.txt:ro
command: >
sh -lc "/opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt
&& /opt/netbox/docker-entrypoint.sh"
netbox-worker: netbox-worker:
restart: unless-stopped restart: unless-stopped