netbox/docker-compose.yml hinzugefügt
This commit is contained in:
82
netbox/docker-compose.yml
Normal file
82
netbox/docker-compose.yml
Normal file
@@ -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:
|
||||||
Reference in New Issue
Block a user