From 986a5a0de28e22ce1a42ec58102c01875b8d36e0 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 2 Nov 2025 14:37:11 +0100 Subject: [PATCH] =?UTF-8?q?netbox/docker-compose.yml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netbox/docker-compose.yml | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 netbox/docker-compose.yml diff --git a/netbox/docker-compose.yml b/netbox/docker-compose.yml new file mode 100644 index 0000000..56a3c9c --- /dev/null +++ b/netbox/docker-compose.yml @@ -0,0 +1,82 @@ +services: + netbox-redis: + image: redis + container_name: netbox-redis + hostname: netbox-redis + healthcheck: + test: ["CMD-SHELL", "redis-cli ping || exit 1"] + command: + - sh + - -c + - redis-server --appendonly yes --requirepass red-pass + #user: 1000:100 + volumes: + - redis:/data:rw + environment: + - REDIS_PASSWORD=red-pass + restart: on-failure:5 + + netbox-db: + image: postgres:16 + container_name: netbox-postgres-db + hostname: netbox-db + healthcheck: + test: ["CMD", "pg_isready", "-q", "-d", "netbox", "-U", "netbox-user"] + timeout: 45s + interval: 10s + retries: 10 + volumes: + - db:/var/lib/postgresql/data:rw + environment: + POSTGRES_DB: netbox + POSTGRES_USER: netbox-user + POSTGRES_PASSWORD: netbox-pass + restart: on-failure:5 + + netbox: + image: ghcr.io/linuxserver/netbox:latest + container_name: netbox + hostname: netbox + environment: + - PUID=1000 + - PGID=100 + - TZ=Europe/Berlin + - SUPERUSER_EMAIL=michael.scheidel@scheidel.biz + - SUPERUSER_PASSWORD=?Aichwald01 + - ALLOWED_HOST=netbox.scheidel.biz + - DB_HOST=netbox-db + - DB_PORT=5432 + - DB_NAME=netbox + - DB_USER=netbox-user + - DB_PASSWORD=netbox-pass + - REDIS_HOST=netbox-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD=red-pass + - REDIS_DB_TASK=0 + - REDIS_DB_CACHE=1 + # Enable python-social-auth + #- REMOTE_AUTH_ENABLED=true + #- REMOTE_AUTH_BACKEND="social_core.backends.open_id_connect.OpenIdConnectAuth" + - LOGIN_REQUIRED=true + - SOCIAL_AUTH_AUTHENTICATION_BACKENDS=social_core.backends.open_id_connect.OpenIdConnectAuth + + # python-social-auth config + - SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://authentik.scheidel.biz/application/o/netbox/" + - SOCIAL_AUTH_OIDC_KEY="LjqN2c0Q6QlwE9pn9mvXxOoTkXdqD8DfhI29Xktd" + - SOCIAL_AUTH_OIDC_SECRET="2NRjuJr9mytXENODKEWZTGzMPPiqjx5WFArGuZzjvXzrHgUXFex0SbheXyvw9sYhi3KyK7iOv2chUWKxcEug3xZIcqEbhIVgeuenoeorbh8DsXP2YSPE8l16ypdPaJPK" + - SOCIAL_AUTH_OIDC_SCOPE=openid profile email roles + - LOGOUT_REDIRECT_URL="https://authentik.scheidel.biz/application/o/netbox/end-session/" + volumes: + - config:/config:rw + ports: + - 9458:8000 + restart: on-failure:5 + depends_on: + netbox-redis: + condition: service_healthy + netbox-db: + condition: service_started +volumes: + redis: + db: + config: