Update netbox

media upload funktioniert mit dieser yml
This commit is contained in:
Timur 2026-07-08 06:56:43 +00:00
parent 37ec107672
commit a5f8e07547

52
netbox
View file

@ -2,26 +2,39 @@ version: '3.8'
services: services:
netbox: netbox:
image: netboxcommunity/netbox:v4.0-2.8.2 image: netboxcommunity/netbox:v4.0
depends_on: depends_on:
- postgres - postgres
- redis - redis
- redis-cache - redis-cache
env_file:
- ./netbox.env
ports: ports:
- "8000:8080" - "8000:8080"
volumes: volumes:
- netbox-media-files:/opt/netbox/netbox/media - netbox-media-files:/opt/netbox/netbox/media
- netbox-reports-files:/opt/netbox/netbox/reports - netbox-reports-files:/opt/netbox/netbox/reports
- netbox-scripts-files:/opt/netbox/netbox/scripts - netbox-scripts-files:/opt/netbox/netbox/scripts
environment:
- POSTGRES_DB=netbox
- POSTGRES_USER=netbox
- POSTGRES_PASSWORD=GeheimesNetboxPw123!
- REDIS_PASSWORD=GeheimesRedisPw123!
- SECRET_KEY=DasIstEinSehrLangerUndSichererNetboxGeheimSchluessel12345!
- ALLOWED_HOSTS=*
- DB_HOST=postgres
- DB_PASSWORD=GeheimesNetboxPw123!
- DB_USER=netbox
- REDIS_HOST=redis
- REDIS_CACHE_HOST=redis-cache
- SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
- SUPERUSER_EMAIL=admin@example.com
- SUPERUSER_NAME=admin
- SUPERUSER_PASSWORD=adminpassword
- MEDIA_ROOT=/opt/netbox/netbox/media # Zwingt Netbox in den richtigen Ordner
netbox-worker: netbox-worker:
image: netboxcommunity/netbox:v4.0-2.8.2 image: netboxcommunity/netbox:v4.0
depends_on: depends_on:
- netbox - netbox
env_file:
- ./netbox.env
command: command:
- /opt/netbox/venv/bin/python - /opt/netbox/venv/bin/python
- /opt/netbox/netbox/manage.py - /opt/netbox/netbox/manage.py
@ -30,13 +43,28 @@ services:
- netbox-media-files:/opt/netbox/netbox/media - netbox-media-files:/opt/netbox/netbox/media
- netbox-reports-files:/opt/netbox/netbox/reports - netbox-reports-files:/opt/netbox/netbox/reports
- netbox-scripts-files:/opt/netbox/netbox/scripts - netbox-scripts-files:/opt/netbox/netbox/scripts
environment:
- POSTGRES_DB=netbox
- POSTGRES_USER=netbox
- POSTGRES_PASSWORD=GeheimesNetboxPw123!
- REDIS_PASSWORD=GeheimesRedisPw123!
- SECRET_KEY=DasIstEinSehrLangerUndSichererNetboxGeheimSchluessel12345!
- ALLOWED_HOSTS=*
- DB_HOST=postgres
- DB_PASSWORD=GeheimesNetboxPw123!
- DB_USER=netbox
- REDIS_HOST=redis
- REDIS_CACHE_HOST=redis-cache
- MEDIA_ROOT=/opt/netbox/netbox/media # Zwingt auch den Worker in den richtigen Ordner
postgres: postgres:
image: postgres:15-alpine image: postgres:15-alpine
env_file:
- ./netbox.env
volumes: volumes:
- netbox-postgres-data:/var/lib/postgresql/data - netbox-postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=netbox
- POSTGRES_USER=netbox
- POSTGRES_PASSWORD=GeheimesNetboxPw123!
redis: redis:
image: redis:7-alpine image: redis:7-alpine
@ -44,10 +72,10 @@ services:
- sh - sh
- -c - -c
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD - redis-server --appendonly yes --requirepass $$REDIS_PASSWORD
env_file:
- ./netbox.env
volumes: volumes:
- netbox-redis-data:/data - netbox-redis-data:/data
environment:
- REDIS_PASSWORD=GeheimesRedisPw123!
redis-cache: redis-cache:
image: redis:7-alpine image: redis:7-alpine
@ -55,8 +83,8 @@ services:
- sh - sh
- -c - -c
- redis-server --requirepass $$REDIS_PASSWORD - redis-server --requirepass $$REDIS_PASSWORD
env_file: environment:
- ./netbox.env - REDIS_PASSWORD=GeheimesRedisPw123!
volumes: volumes:
netbox-postgres-data: netbox-postgres-data: