diff --git a/netbox b/netbox index 905af21..2b4bc53 100644 --- a/netbox +++ b/netbox @@ -1,66 +1,66 @@ -version: "3.9" +version: '3.8' services: - postgres: - image: postgres:16 - environment: - POSTGRES_DB: netbox - POSTGRES_USER: netbox - POSTGRES_PASSWORD: SuperSicheresPasswort - volumes: - - postgres_data:/var/lib/postgresql/data - networks: - - netbox - - redis: - image: redis:7-alpine - command: redis-server --appendonly yes - volumes: - - redis_data:/data - networks: - - netbox - netbox: - image: netboxcommunity/netbox:latest + image: netboxcommunity/netbox:v4.0-2.8.2 depends_on: - postgres - redis - environment: - ALLOWED_HOSTS: "*" - DB_NAME: netbox - DB_USER: netbox - DB_PASSWORD: SuperSicheresPasswort - DB_HOST: postgres - DB_PORT: 5432 - REDIS_HOST: redis - REDIS_PORT: 6379 - REDIS_CACHE_HOST: redis - REDIS_CACHE_PORT: 6379 - - SECRET_KEY: "ERSETZE_DIESEN_STRING_MIT_EINEM_LANGEN_ZUFALLSWERT" - - SUPERUSER_NAME: admin - SUPERUSER_EMAIL: admin@example.com - SUPERUSER_PASSWORD: AdminPasswort123! - - volumes: - - netbox_media:/opt/netbox/netbox/media - - netbox_reports:/opt/netbox/netbox/reports - - netbox_scripts:/opt/netbox/netbox/scripts - + - redis-cache + env_file: + - ./netbox.env ports: - "8000:8080" + volumes: + - netbox-media-files:/opt/netbox/netbox/media + - netbox-reports-files:/opt/netbox/netbox/reports + - netbox-scripts-files:/opt/netbox/netbox/scripts - networks: + netbox-worker: + image: netboxcommunity/netbox:v4.0-2.8.2 + depends_on: - netbox + env_file: + - ./netbox.env + command: + - /opt/netbox/venv/bin/python + - /opt/netbox/netbox/manage.py + - rqworker + volumes: + - netbox-media-files:/opt/netbox/netbox/media + - netbox-reports-files:/opt/netbox/netbox/reports + - netbox-scripts-files:/opt/netbox/netbox/scripts + + postgres: + image: postgres:15-alpine + env_file: + - ./netbox.env + volumes: + - netbox-postgres-data:/var/lib/postgresql/data + + redis: + image: redis:7-alpine + command: + - sh + - -c + - redis-server --appendonly yes --requirepass $$REDIS_PASSWORD + env_file: + - ./netbox.env + volumes: + - netbox-redis-data:/data + + redis-cache: + image: redis:7-alpine + command: + - sh + - -c + - redis-server --requirepass $$REDIS_PASSWORD + env_file: + - ./netbox.env volumes: - postgres_data: - redis_data: - netbox_media: - netbox_reports: - netbox_scripts: - -networks: - netbox: - driver: overlay \ No newline at end of file + netbox-postgres-data: + netbox-redis-data: + netbox-media-files: + netbox-reports-files: + netbox-scripts-files: \ No newline at end of file