mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-03-22 08:16:54 +00:00
Refactor netbox service in docker-compose.override.yml to include build context and Dockerfile, and remove unnecessary logging configuration
This commit is contained in:
parent
4ae3ab6350
commit
c11718fce1
11
Dockerfile-plugins
Normal file
11
Dockerfile-plugins
Normal 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
|
||||
|
|
@ -1,18 +1,14 @@
|
|||
services:
|
||||
netbox:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-plugins
|
||||
args:
|
||||
FROM_TAG: v4.4-3
|
||||
image: bboerni2/netbox:v4.4-3-plugins
|
||||
ports:
|
||||
- "8000:8080"
|
||||
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:
|
||||
restart: unless-stopped
|
||||
|
|
|
|||
Loading…
Reference in a new issue