mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-12-11 06:12:37 +00:00
Compare commits
5 commits
31c55dd924
...
58f30ef4fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58f30ef4fd | ||
|
|
b97c177df8 | ||
|
|
67eff20f7d | ||
|
|
39d2b726af | ||
|
|
eaad696666 |
|
|
@ -79,7 +79,6 @@ COPY ${NETBOX_PATH} /opt/netbox
|
|||
COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
|
||||
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
|
||||
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
|
||||
COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
|
||||
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
|
||||
COPY configuration/ /etc/netbox/config/
|
||||
COPY docker/nginx-unit.json /etc/unit/
|
||||
|
|
|
|||
|
|
@ -305,6 +305,12 @@ REMOTE_AUTH_SUPERUSER_GROUPS = _environ_get_and_map('REMOTE_AUTH_SUPERUSER_GROUP
|
|||
REMOTE_AUTH_SUPERUSERS = _environ_get_and_map('REMOTE_AUTH_SUPERUSERS', '', _AS_LIST)
|
||||
REMOTE_AUTH_STAFF_GROUPS = _environ_get_and_map('REMOTE_AUTH_STAFF_GROUPS', '', _AS_LIST)
|
||||
REMOTE_AUTH_STAFF_USERS = _environ_get_and_map('REMOTE_AUTH_STAFF_USERS', '', _AS_LIST)
|
||||
# SSO Configuration
|
||||
SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY')
|
||||
SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET = _read_secret('okta_openidconnect_secret', environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET', ''))
|
||||
SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL')
|
||||
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
|
||||
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = _read_secret('google_oauth2_secret', environ.get('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET', ''))
|
||||
|
||||
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
|
||||
# version check or use the URL below to check for release in the official NetBox repository.
|
||||
|
|
|
|||
|
|
@ -19,4 +19,17 @@ services:
|
|||
# SUPERUSER_EMAIL: ""
|
||||
# SUPERUSER_NAME: ""
|
||||
# SUPERUSER_PASSWORD: ""
|
||||
# SSO Configuration
|
||||
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY: "your_okta_client_id"
|
||||
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL: "https://your-domain.okta.com"
|
||||
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY: "your_google_client_id"
|
||||
# secrets:
|
||||
# - okta_openidconnect_secret
|
||||
# - google_oauth2_secret
|
||||
|
||||
# Uncomment to use Docker secrets for SSO credentials
|
||||
# secrets:
|
||||
# okta_openidconnect_secret:
|
||||
# file: ./secrets/okta_secret.txt
|
||||
# google_oauth2_secret:
|
||||
# file: ./secrets/google_secret.txt
|
||||
|
|
@ -28,15 +28,6 @@ services:
|
|||
start_period: 40s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
netbox-housekeeping:
|
||||
<<: *netbox
|
||||
command:
|
||||
- /opt/netbox/housekeeping.sh
|
||||
healthcheck:
|
||||
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
|
||||
start_period: 40s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
|
||||
postgres:
|
||||
image: docker.io/postgres:17-alpine
|
||||
|
|
|
|||
|
|
@ -31,18 +31,6 @@ services:
|
|||
start_period: 20s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
netbox-housekeeping:
|
||||
<<: *netbox
|
||||
depends_on:
|
||||
netbox:
|
||||
condition: service_healthy
|
||||
command:
|
||||
- /opt/netbox/housekeeping.sh
|
||||
healthcheck:
|
||||
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
|
||||
start_period: 20s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
|
||||
# postgres
|
||||
postgres:
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
SLEEP_SECONDS=${HOUSEKEEPING_INTERVAL:=86400}
|
||||
echo "Interval set to ${SLEEP_SECONDS} seconds"
|
||||
while true; do
|
||||
date
|
||||
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
|
||||
sleep "${SLEEP_SECONDS}s"
|
||||
done
|
||||
9
env/netbox.env
vendored
9
env/netbox.env
vendored
|
|
@ -15,7 +15,6 @@ EMAIL_USERNAME=netbox
|
|||
EMAIL_USE_SSL=false
|
||||
EMAIL_USE_TLS=false
|
||||
GRAPHQL_ENABLED=true
|
||||
HOUSEKEEPING_INTERVAL=86400
|
||||
MEDIA_ROOT=/opt/netbox/netbox/media
|
||||
METRICS_ENABLED=false
|
||||
REDIS_CACHE_DATABASE=1
|
||||
|
|
@ -31,4 +30,12 @@ REDIS_SSL=false
|
|||
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
|
||||
SECRET_KEY='r(m)9nLGnz$(_q3N4z1k(EFsMCjjjzx08x9VhNVcfd%6RF#r!6DE@+V5Zk2X'
|
||||
SKIP_SUPERUSER=true
|
||||
# SSO Configuration (uncomment and configure as needed)
|
||||
# OKTA OpenID Connect
|
||||
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY=your_okta_client_id
|
||||
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET=your_okta_client_secret
|
||||
# SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL=https://your-domain.okta.com
|
||||
# Google OAuth2
|
||||
# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=your_google_client_id
|
||||
# SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=your_google_client_secret
|
||||
WEBHOOKS_ENABLED=true
|
||||
|
|
|
|||
Loading…
Reference in a new issue