Compare commits

...

5 Commits

Author SHA1 Message Date
5a4e9d7a14 Merge branch 'miso231-patch-1' 2019-07-02 21:33:54 +02:00
89b9c22252 Merge branch 'patch-1' of https://github.com/miso231/netbox-docker into miso231-patch-1 2019-07-02 21:33:36 +02:00
dc3db2d9fd %s/digitalocean/netbox-community/gi
Thank you Digitalocean for sponsoring Netbox!
And thank you for letting it grow up and move out ;)
2019-07-02 21:32:58 +02:00
0270fc2dca Retype REDIS_PORT to int 2019-07-01 17:29:58 +02:00
aed5126279 Provides necessary changes for v2.6 compatibility
Fixes #139
2019-06-21 22:48:23 +02:00
8 changed files with 79 additions and 57 deletions

View File

@ -36,7 +36,7 @@ WORKDIR /tmp
# As the requirements don't change very often, # As the requirements don't change very often,
# and as they take some time to compile, # and as they take some time to compile,
# we try to cache them very agressively. # we try to cache them very agressively.
ARG REQUIREMENTS_URL=https://raw.githubusercontent.com/digitalocean/netbox/$BRANCH/requirements.txt ARG REQUIREMENTS_URL=https://raw.githubusercontent.com/netbox-community/netbox/$BRANCH/requirements.txt
ADD ${REQUIREMENTS_URL} requirements.txt ADD ${REQUIREMENTS_URL} requirements.txt
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
@ -44,12 +44,12 @@ RUN pip install -r requirements.txt
# ADD will fetch the file and check if it has changed # ADD will fetch the file and check if it has changed
# If not, Docker will use the existing build cache. # If not, Docker will use the existing build cache.
# If yes, Docker will bust the cache and run every build step from here on. # If yes, Docker will bust the cache and run every build step from here on.
ARG REF_URL=https://api.github.com/repos/digitalocean/netbox/contents?ref=$BRANCH ARG REF_URL=https://api.github.com/repos/netbox-community/netbox/contents?ref=$BRANCH
ADD ${REF_URL} version.json ADD ${REF_URL} version.json
WORKDIR /opt WORKDIR /opt
ARG URL=https://github.com/digitalocean/netbox/archive/$BRANCH.tar.gz ARG URL=https://github.com/netbox-community/netbox/archive/$BRANCH.tar.gz
RUN wget -q -O - "${URL}" | tar xz \ RUN wget -q -O - "${URL}" | tar xz \
&& mv netbox* netbox && mv netbox* netbox

View File

@ -13,17 +13,17 @@ Questions? Before opening an issue on Github, please join the [Network To Code][
To get Netbox up and running: To get Netbox up and running:
``` ```bash
$ git clone -b master https://github.com/netbox-community/netbox-docker.git git clone -b master https://github.com/netbox-community/netbox-docker.git
$ cd netbox-docker cd netbox-docker
$ docker-compose pull docker-compose pull
$ docker-compose up -d docker-compose up -d
``` ```
The application will be available after a few minutes. The application will be available after a few minutes.
Use `docker-compose port nginx 8080` to find out where to connect to. Use `docker-compose port nginx 8080` to find out where to connect to.
``` ```bash
$ echo "http://$(docker-compose port nginx 8080)/" $ echo "http://$(docker-compose port nginx 8080)/"
http://0.0.0.0:32768/ http://0.0.0.0:32768/
@ -85,12 +85,7 @@ You may run this image in a cluster such as Docker Swarm, Kubernetes or OpenShif
In this case, we encourage you to statically configure Netbox by starting from [Netbox's example config file][default-config], and mounting it into your container in the directory `/etc/netbox/config/` using the mechanism provided by your container platform (i.e. [Docker Swarm configs][swarm-config], [Kubernetes ConfigMap][k8s-config], [OpenShift ConfigMaps][openshift-config]). In this case, we encourage you to statically configure Netbox by starting from [Netbox's example config file][default-config], and mounting it into your container in the directory `/etc/netbox/config/` using the mechanism provided by your container platform (i.e. [Docker Swarm configs][swarm-config], [Kubernetes ConfigMap][k8s-config], [OpenShift ConfigMaps][openshift-config]).
But if you rather continue to configure your application through environment variables, you may continue to use [the built-in configuration file][ But if you rather continue to configure your application through environment variables, you may continue to use [the built-in configuration file][docker-config].
].
We discourage storing secrets in environment variables, as environment variable are passed on to all sub-processes and may leak easily into other systems, e.g. error collecting tools that often collect all environment variables whenever an error occurs. We discourage storing secrets in environment variables, as environment variable are passed on to all sub-processes and may leak easily into other systems, e.g. error collecting tools that often collect all environment variables whenever an error occurs.
Therefore we *strongly advise* to make use of the secrets mechanism provided by your container platform (i.e. [Docker Swarm secrets][swarm-secrets], [Kubernetes secrets][k8s-secrets], [OpenShift secrets][openshift-secrets]). Therefore we *strongly advise* to make use of the secrets mechanism provided by your container platform (i.e. [Docker Swarm secrets][swarm-secrets], [Kubernetes secrets][k8s-secrets], [OpenShift secrets][openshift-secrets]).
@ -109,7 +104,7 @@ If a secret is defined by an environment variable and in the respective file at
Please also consider [the advice about running Netbox in production](#production) above! Please also consider [the advice about running Netbox in production](#production) above!
[docker-config]: https://github.com/netbox-community/netbox-docker/blob/master/configuration/configuration.py [docker-config]: https://github.com/netbox-community/netbox-docker/blob/master/configuration/configuration.py
[default-config]: https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py [default-config]: https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py
[entrypoint]: https://github.com/netbox-community/netbox-docker/blob/master/docker/docker-entrypoint.sh [entrypoint]: https://github.com/netbox-community/netbox-docker/blob/master/docker/docker-entrypoint.sh
[swarm-config]: https://docs.docker.com/engine/swarm/configs/ [swarm-config]: https://docs.docker.com/engine/swarm/configs/
[swarm-secrets]: https://docs.docker.com/engine/swarm/secrets/ [swarm-secrets]: https://docs.docker.com/engine/swarm/secrets/
@ -219,7 +214,7 @@ echo "from django.contrib.auth.models import Permission\nfor p in Permission.obj
You can also build your own Netbox Docker image containing your own startup scripts, custom fields, users and groups You can also build your own Netbox Docker image containing your own startup scripts, custom fields, users and groups
like this: like this:
``` ```Dockerfile
ARG VERSION=latest ARG VERSION=latest
FROM netboxcommunity/netbox:$VERSION FROM netboxcommunity/netbox:$VERSION
@ -234,27 +229,27 @@ To use this feature, set the environment-variable `VERSION` before launching `do
`VERSION` may be set to the name of `VERSION` may be set to the name of
[any tag of the `netboxcommunity/netbox` Docker image on Docker Hub][netbox-dockerhub]. [any tag of the `netboxcommunity/netbox` Docker image on Docker Hub][netbox-dockerhub].
``` ```bash
$ export VERSION=v2.2.6 export VERSION=v2.2.6
$ docker-compose pull netbox docker-compose pull netbox
$ docker-compose up -d docker-compose up -d
``` ```
You can also build a specific version of the Netbox image. This time, `VERSION` indicates any valid You can also build a specific version of the Netbox image. This time, `VERSION` indicates any valid
[Git Reference][git-ref] declared on [the 'digitalocean/netbox' Github repository][netbox-github]. [Git Reference][git-ref] declared on [the 'netbox-community/netbox' Github repository][netbox-github].
Most commonly you will specify a tag or branch name. Most commonly you will specify a tag or branch name.
``` ```bash
$ export VERSION=develop export VERSION=develop
$ docker-compose build --no-cache netbox docker-compose build --no-cache netbox
$ docker-compose up -d docker-compose up -d
``` ```
Hint: If you're building a specific version by tag name, the `--no-cache` argument is not strictly necessary. Hint: If you're building a specific version by tag name, the `--no-cache` argument is not strictly necessary.
This can increase the build speed if you're just adjusting the config, for example. This can increase the build speed if you're just adjusting the config, for example.
[git-ref]: https://git-scm.com/book/en/v2/Git-Internals-Git-References [git-ref]: https://git-scm.com/book/en/v2/Git-Internals-Git-References
[netbox-github]: https://github.com/digitalocean/netbox/releases [netbox-github]: https://github.com/netbox-community/netbox/releases
### LDAP enabled variant ### LDAP enabled variant
@ -304,7 +299,7 @@ Now start everything up again.
If this didn't help, try to see if there's anything in the logs indicating why nginx doesn't start: If this didn't help, try to see if there's anything in the logs indicating why nginx doesn't start:
```bash ```bash
$ docker-compose logs -f nginx docker-compose logs -f nginx
``` ```
### Getting a "Bad Request (400)" ### Getting a "Bad Request (400)"
@ -331,14 +326,14 @@ docker-compose up -d netbox netbox-worker
First make sure that the webhooks feature is enabled in your Netbox configuration and that a redis host is defined. First make sure that the webhooks feature is enabled in your Netbox configuration and that a redis host is defined.
Check `netbox.env` if the following variables are defined: Check `netbox.env` if the following variables are defined:
``` ```bash
WEBHOOKS_ENABLED=true WEBHOOKS_ENABLED=true
REDIS_HOST=redis REDIS_HOST=redis
``` ```
Then make sure that the `redis` container and at least one `netbox-worker` are running. Then make sure that the `redis` container and at least one `netbox-worker` are running.
``` ```bash
# check the container status # check the container status
$ docker-compose ps $ docker-compose ps
@ -385,6 +380,18 @@ Compare the version with the list below to check whether a breaking change was i
The following is a list of breaking changes of the `netbox-docker` project: The following is a list of breaking changes of the `netbox-docker` project:
* 0.16.0: Update the Netbox URL from "github.com/digitalocean/netbox" to "github.com/netbox-community/netbox"
* 0.15.0: Update for Netbox v2.6.0.
The `configuration/configuration.py` file has been updated to match the file from Netbox.
`CORS_ORIGIN_WHITELIST` has a new default value of `http://localhost`.
To provide a nice development environment, `CORS_ORIGIN_ALLOW_ALL` added to `env/netbox.env` with a default value of `True`.
There are also new options:
* `REDIS_CACHE_DATABASE`
* `CACHE_TIMEOUT` (set to 0 to disable caching)
* `CHANGELOG_RETENTION`
* `CORS_ORIGIN_REGEX_WHITELIST` (space separated list of regular expressions)
* `EXEMPT_VIEW_PERMISSIONS` (space separated list)
* `METRICS_ENABLED`
* 0.14.0: Improved caching strategy [#137][137] [#136][136]. * 0.14.0: Improved caching strategy [#137][137] [#136][136].
New `AUTH_LDAP_GROUP_TYPE` environment variable [#135][135]. New `AUTH_LDAP_GROUP_TYPE` environment variable [#135][135].
* 0.13.0: `AUTH_LDAP_BIND_PASSWORD` can now be extracted into a secrets file. [#133][133] * 0.13.0: `AUTH_LDAP_BIND_PASSWORD` can now be extracted into a secrets file. [#133][133]
@ -425,8 +432,8 @@ New Docker images are built and published every 24h on the [Docker Build Infrast
To run the tests coming with Netbox, use the `docker-compose.yml` file as such: To run the tests coming with Netbox, use the `docker-compose.yml` file as such:
``` ```bash
$ docker-compose run netbox ./manage.py test docker-compose run netbox ./manage.py test
``` ```
## About ## About

View File

@ -1 +1 @@
0.14.0 0.15.0

View File

@ -11,7 +11,7 @@ else
GITHUB_OAUTH_PARAMS="" GITHUB_OAUTH_PARAMS=""
fi fi
ORIGINAL_GITHUB_REPO="${SRC_ORG-digitalocean}/${SRC_REPO-netbox}" ORIGINAL_GITHUB_REPO="${SRC_ORG-netbox-community}/${SRC_REPO-netbox}"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}" GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches?${GITHUB_OAUTH_PARAMS}" URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches?${GITHUB_OAUTH_PARAMS}"

View File

@ -11,7 +11,7 @@ else
GITHUB_OAUTH_PARAMS="" GITHUB_OAUTH_PARAMS=""
fi fi
ORIGINAL_GITHUB_REPO="digitalocean/netbox" ORIGINAL_GITHUB_REPO="netbox-community/netbox"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}" GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/releases?${GITHUB_OAUTH_PARAMS}" URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/releases?${GITHUB_OAUTH_PARAMS}"

View File

@ -38,7 +38,7 @@ if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
echo " This is used to tag all patch releases to their containing version e.g. v2.5.1 -> v2.5" echo " This is used to tag all patch releases to their containing version e.g. v2.5.1 -> v2.5"
echo " Default: <DOCKER_ORG>/<DOCKER_REPO>:\$MAJOR.\$MINOR" echo " Default: <DOCKER_ORG>/<DOCKER_REPO>:\$MAJOR.\$MINOR"
echo " SRC_ORG Which fork of netbox to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)." echo " SRC_ORG Which fork of netbox to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)."
echo " Default: digitalocean" echo " Default: netbox-community"
echo " SRC_REPO The name of the netbox for to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)." echo " SRC_REPO The name of the netbox for to use (i.e. github.com/<SRC_ORG>/<SRC_REPO>)."
echo " Default: netbox" echo " Default: netbox"
echo " URL Where to fetch the package from." echo " URL Where to fetch the package from."
@ -81,7 +81,7 @@ fi
NETBOX_DOCKER_PROJECT_VERSION="${NETBOX_DOCKER_PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}" NETBOX_DOCKER_PROJECT_VERSION="${NETBOX_DOCKER_PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}"
# variables for fetching the source # variables for fetching the source
SRC_ORG="${SRC_ORG-digitalocean}" SRC_ORG="${SRC_ORG-netbox-community}"
SRC_REPO="${SRC_REPO-netbox}" SRC_REPO="${SRC_REPO-netbox}"
BRANCH="${1}" BRANCH="${1}"
URL="${URL-https://github.com/${SRC_ORG}/${SRC_REPO}/archive/$BRANCH.tar.gz}" URL="${URL-https://github.com/${SRC_ORG}/${SRC_REPO}/archive/$BRANCH.tar.gz}"

View File

@ -1,8 +1,9 @@
import os import os
import re
import socket import socket
# For reference see http://netbox.readthedocs.io/en/latest/configuration/mandatory-settings/ # For reference see http://netbox.readthedocs.io/en/latest/configuration/mandatory-settings/
# Based on https://github.com/digitalocean/netbox/blob/develop/netbox/netbox/configuration.example.py # Based on https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py
# Read secret from file # Read secret from file
def read_secret(secret_name): def read_secret(secret_name):
@ -44,6 +45,17 @@ DATABASE = {
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
SECRET_KEY = os.environ.get('SECRET_KEY', read_secret('secret_key')) SECRET_KEY = os.environ.get('SECRET_KEY', read_secret('secret_key'))
# Redis database settings. The Redis database is used for caching and background processing such as webhooks
REDIS = {
'HOST': os.environ.get('REDIS_HOST', 'localhost'),
'PORT': int(os.environ.get('REDIS_PORT', 6379)),
'PASSWORD': os.environ.get('REDIS_PASSWORD', read_secret('redis_password')),
'DATABASE': os.environ.get('REDIS_DATABASE', '0'),
'CACHE_DATABASE': os.environ.get('REDIS_CACHE_DATABASE', '1'),
'DEFAULT_TIMEOUT': os.environ.get('REDIS_TIMEOUT', '300'),
'SSL': os.environ.get('REDIS_SSL', 'False').lower() == 'true',
}
######################### #########################
# # # #
# Optional settings # # Optional settings #
@ -68,14 +80,18 @@ BANNER_LOGIN = os.environ.get('BANNER_LOGIN', '')
# BASE_PATH = 'netbox/' # BASE_PATH = 'netbox/'
BASE_PATH = os.environ.get('BASE_PATH', '') BASE_PATH = os.environ.get('BASE_PATH', '')
# Cache timeout in seconds. Set to 0 to dissable caching. Defaults to 900 (15 minutes)
CACHE_TIMEOUT = int(os.environ.get('CACHE_TIMEOUT', 900))
# Maximum number of days to retain logged changes. Set to 0 to retain changes indefinitely. (Default: 90)
CHANGELOG_RETENTION = int(os.environ.get('CHANGELOG_RETENTION', 90))
# API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be # API Cross-Origin Resource Sharing (CORS) settings. If CORS_ORIGIN_ALLOW_ALL is set to True, all origins will be
# allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or # allowed. Otherwise, define a list of allowed origins using either CORS_ORIGIN_WHITELIST or
# CORS_ORIGIN_REGEX_WHITELIST. For more information, see https://github.com/ottoyiu/django-cors-headers # CORS_ORIGIN_REGEX_WHITELIST. For more information, see https://github.com/ottoyiu/django-cors-headers
CORS_ORIGIN_ALLOW_ALL = os.environ.get('CORS_ORIGIN_ALLOW_ALL', 'False').lower() == 'true' CORS_ORIGIN_ALLOW_ALL = os.environ.get('CORS_ORIGIN_ALLOW_ALL', 'False').lower() == 'true'
CORS_ORIGIN_WHITELIST = os.environ.get('CORS_ORIGIN_WHITELIST', '').split(' ') CORS_ORIGIN_WHITELIST = list(filter(None, os.environ.get('CORS_ORIGIN_WHITELIST', 'https://localhost').split(' ')))
CORS_ORIGIN_REGEX_WHITELIST = [ CORS_ORIGIN_REGEX_WHITELIST = [re.compile(r) for r in list(filter(None, os.environ.get('CORS_ORIGIN_REGEX_WHITELIST', '').split(' ')))]
# r'^(https?://)?(\w+\.)?example\.com$',
]
# Set to True to enable server debugging. WARNING: Debugging introduces a substantial performance penalty and may reveal # Set to True to enable server debugging. WARNING: Debugging introduces a substantial performance penalty and may reveal
# sensitive information about your installation. Only enable debugging while performing testing. Never enable debugging # sensitive information about your installation. Only enable debugging while performing testing. Never enable debugging
@ -97,6 +113,10 @@ EMAIL = {
# set ENFORCE_GLOBAL_UNIQUE to True. # set ENFORCE_GLOBAL_UNIQUE to True.
ENFORCE_GLOBAL_UNIQUE = os.environ.get('ENFORCE_GLOBAL_UNIQUE', 'False').lower() == 'true' ENFORCE_GLOBAL_UNIQUE = os.environ.get('ENFORCE_GLOBAL_UNIQUE', 'False').lower() == 'true'
# Exempt certain models from the enforcement of view permissions. Models listed here will be viewable by all users and
# by anonymous users. List models in the form `<app>.<model>`. Add '*' to this list to exempt all models.
EXEMPT_VIEW_PERMISSIONS = list(filter(None, os.environ.get('EXEMPT_VIEW_PERMISSIONS', '').split(' ')))
# Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs: # Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs:
# https://docs.djangoproject.com/en/1.11/topics/logging/ # https://docs.djangoproject.com/en/1.11/topics/logging/
LOGGING = {} LOGGING = {}
@ -117,6 +137,9 @@ MAX_PAGE_SIZE = int(os.environ.get('MAX_PAGE_SIZE', 1000))
# the default value of this setting is derived from the installed location. # the default value of this setting is derived from the installed location.
MEDIA_ROOT = os.environ.get('MEDIA_ROOT', os.path.join(BASE_DIR, 'media')) MEDIA_ROOT = os.environ.get('MEDIA_ROOT', os.path.join(BASE_DIR, 'media'))
# Expose Prometheus monitoring metrics at the HTTP endpoint '/metrics'
METRICS_ENABLED = os.environ.get('METRICS_ENABLED', 'False').lower() == 'true'
# Credentials that NetBox will use to access live devices. # Credentials that NetBox will use to access live devices.
NAPALM_USERNAME = os.environ.get('NAPALM_USERNAME', '') NAPALM_USERNAME = os.environ.get('NAPALM_USERNAME', '')
NAPALM_PASSWORD = os.environ.get('NAPALM_PASSWORD', read_secret('napalm_password')) NAPALM_PASSWORD = os.environ.get('NAPALM_PASSWORD', read_secret('napalm_password'))
@ -134,21 +157,6 @@ PAGINATE_COUNT = int(os.environ.get('PAGINATE_COUNT', 50))
# When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to # When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to
# prefer IPv4 instead. # prefer IPv4 instead.
PREFER_IPV4 = os.environ.get('PREFER_IPV4', 'False').lower() == 'true' PREFER_IPV4 = os.environ.get('PREFER_IPV4', 'False').lower() == 'true'
# The Webhook event backend is disabled by default. Set this to True to enable it. Note that this requires a Redis
# database be configured and accessible by NetBox (see `REDIS` below).
WEBHOOKS_ENABLED = os.environ.get('WEBHOOKS_ENABLED', 'False').lower() == 'true'
# Redis database settings (optional). A Redis database is required only if the webhooks backend is enabled.
REDIS = {
'HOST': os.environ.get('REDIS_HOST', 'localhost'),
'PORT': os.environ.get('REDIS_PORT', 6379),
'PASSWORD': os.environ.get('REDIS_PASSWORD', read_secret('redis_password')),
'DATABASE': os.environ.get('REDIS_DATABASE', '0'),
'DEFAULT_TIMEOUT': os.environ.get('REDIS_TIMEOUT', '300'),
'SSL': os.environ.get('REDIS_SSL', 'False').lower() == 'true',
}
# The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of # The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of
# this setting is derived from the installed location. # this setting is derived from the installed location.
REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports') REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports')
@ -156,6 +164,10 @@ REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports')
# Time zone (default: UTC) # Time zone (default: UTC)
TIME_ZONE = os.environ.get('TIME_ZONE', 'UTC') TIME_ZONE = os.environ.get('TIME_ZONE', 'UTC')
# The Webhook event backend is disabled by default. Set this to True to enable it. Note that this requires a Redis
# database be configured and accessible by NetBox (see `REDIS` below).
WEBHOOKS_ENABLED = os.environ.get('WEBHOOKS_ENABLED', 'False').lower() == 'true'
# Date/time formatting. See the following link for supported formats: # Date/time formatting. See the following link for supported formats:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = os.environ.get('DATE_FORMAT', 'N j, Y') DATE_FORMAT = os.environ.get('DATE_FORMAT', 'N j, Y')

3
env/netbox.env vendored
View File

@ -1,3 +1,4 @@
CORS_ORIGIN_ALLOW_ALL=True
DB_NAME=netbox DB_NAME=netbox
DB_USER=netbox DB_USER=netbox
DB_PASSWORD=J5brHrAXFLQSif0K DB_PASSWORD=J5brHrAXFLQSif0K
@ -15,6 +16,8 @@ NAPALM_TIMEOUT=10
MAX_PAGE_SIZE=1000 MAX_PAGE_SIZE=1000
REDIS_HOST=redis REDIS_HOST=redis
REDIS_PASSWORD=H733Kdjndks81 REDIS_PASSWORD=H733Kdjndks81
REDIS_DATABASE=0
REDIS_CACHE_DATABASE=1
REDIS_SSL=false REDIS_SSL=false
SECRET_KEY=r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj SECRET_KEY=r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
SUPERUSER_NAME=admin SUPERUSER_NAME=admin