From 9b389ca98a77f115d44fcf28e59d33770619678d Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 9 Sep 2022 09:01:49 +0200 Subject: [PATCH] added netbox --- netbox/.gitignore | 4 +++ netbox/README.md | 12 ++++++++ netbox/docker-compose.yaml | 58 ++++++++++++++++++++++++++++++++++++++ netbox/env_example | 11 ++++++++ 4 files changed, 85 insertions(+) create mode 100644 netbox/.gitignore create mode 100644 netbox/README.md create mode 100644 netbox/docker-compose.yaml create mode 100644 netbox/env_example diff --git a/netbox/.gitignore b/netbox/.gitignore new file mode 100644 index 0000000..0c4b1bb --- /dev/null +++ b/netbox/.gitignore @@ -0,0 +1,4 @@ +.env +config/ +db/ + diff --git a/netbox/README.md b/netbox/README.md new file mode 100644 index 0000000..e2d9306 --- /dev/null +++ b/netbox/README.md @@ -0,0 +1,12 @@ +# Netbox docker container + +NetBox is the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation. Available as open source software under the Apache 2.0 license, NetBox is employed by thousands of organizations around the world. + +### requirements: + + - installed system with docker-compose + - running in /services/netbox/ + - adjust env_example and rename to .env + +Website: +https://github.com/netbox-community/netbox diff --git a/netbox/docker-compose.yaml b/netbox/docker-compose.yaml new file mode 100644 index 0000000..038333d --- /dev/null +++ b/netbox/docker-compose.yaml @@ -0,0 +1,58 @@ +--- +version: "2.1" +networks: + netboxnet: +services: +#netbox + netbox: + image: lscr.io/linuxserver/netbox:latest + container_name: netbox_app + depends_on: + - db + - redis + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Berlin + - SUPERUSER_EMAIL=${SUPERUSER_EMAIL} + - SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD} + - ALLOWED_HOST=${ALLOWED_HOST} + - DB_NAME=${DB_NAME} + - DB_USER=${DB_USER} + - DB_PASSWORD=${DB_PASSWORD} + - DB_HOST=${DB_HOST} + - DB_PORT=${DB_PORT} + - REDIS_HOST=${REDIS_HOST} + - REDIS_PORT=${REDIS_PORT} + volumes: + - ./config:/config + networks: + - netboxnet + ports: + - ${NETBOX_PORT}:8000 + restart: unless-stopped +# postgres + db: + image: postgres:latest + container_name: netbox_db + restart: always + environment: + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_DB=${DB_NAME} + networks: + - netboxnet + ports: + - ${DB_PORT}:5432 + volumes: + - ./db:/var/lib/postgresql/data +# redis + redis: + image: 'bitnami/redis:latest' + container_name: netbox_redis + environment: + - ALLOW_EMPTY_PASSWORD=yes + networks: + - netboxnet + ports: + - ${REDIS_PORT}:6379 diff --git a/netbox/env_example b/netbox/env_example new file mode 100644 index 0000000..c041c26 --- /dev/null +++ b/netbox/env_example @@ -0,0 +1,11 @@ +SUPERUSER_EMAIL= +SUPERUSER_PASSWORD= +ALLOWED_HOST= +DB_NAME= +DB_USER= +DB_PASSWORD= +DB_HOST= +DB_PORT= +REDIS_HOST= +REDIS_PORT= +NETBOX_PORT=