mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-01-29 06:01:51 +00:00
Compare commits
7 commits
2e492302a6
...
2f961e13a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f961e13a8 | ||
|
|
1d8a31be83 | ||
|
|
109ef8afd2 | ||
|
|
b329ab9e61 | ||
|
|
56e8af355e | ||
|
|
477decd80a | ||
|
|
1815408e73 |
|
|
@ -89,7 +89,7 @@ WORKDIR /opt/netbox/netbox
|
||||||
|
|
||||||
# Must set permissions for '/opt/netbox/netbox/media' directory
|
# Must set permissions for '/opt/netbox/netbox/media' directory
|
||||||
# to g+w so that pictures can be uploaded to netbox.
|
# to g+w so that pictures can be uploaded to netbox.
|
||||||
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
|
RUN mkdir -p static media /opt/unit/state/ /opt/unit/tmp/ \
|
||||||
&& chown -R unit:root /opt/unit/ media reports scripts \
|
&& chown -R unit:root /opt/unit/ media reports scripts \
|
||||||
&& chmod -R g+w /opt/unit/ media reports scripts \
|
&& chmod -R g+w /opt/unit/ media reports scripts \
|
||||||
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
|
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
|
||||||
|
|
|
||||||
7
build.sh
7
build.sh
|
|
@ -105,6 +105,9 @@ GH_ACTION If defined, special 'echo' statements are enabled that set the
|
||||||
CHECK_ONLY Only checks if the build is needed and sets the GH Action output.
|
CHECK_ONLY Only checks if the build is needed and sets the GH Action output.
|
||||||
${_GREEN}Default:${_CLEAR} undefined
|
${_GREEN}Default:${_CLEAR} undefined
|
||||||
|
|
||||||
|
NO_CACHE Disables Docker Build Cache.
|
||||||
|
${_GREEN}Default:${_CLEAR} undefined
|
||||||
|
|
||||||
${_BOLD}Examples:${_CLEAR}
|
${_BOLD}Examples:${_CLEAR}
|
||||||
|
|
||||||
${0} main
|
${0} main
|
||||||
|
|
@ -409,7 +412,9 @@ fi
|
||||||
if [ -n "${NO_PROXY}" ]; then
|
if [ -n "${NO_PROXY}" ]; then
|
||||||
DOCKER_BUILD_ARGS+=(--build-arg "no_proxy=${NO_PROXY}")
|
DOCKER_BUILD_ARGS+=(--build-arg "no_proxy=${NO_PROXY}")
|
||||||
fi
|
fi
|
||||||
|
if [ -n "${NO_CACHE}" ]; then
|
||||||
|
DOCKER_BUILD_ARGS+=(--no-cache)
|
||||||
|
fi
|
||||||
DOCKER_BUILD_ARGS+=(--platform "${BUILDX_PLATFORM-linux/amd64}")
|
DOCKER_BUILD_ARGS+=(--platform "${BUILDX_PLATFORM-linux/amd64}")
|
||||||
if [ "${2}" == "--push" ]; then
|
if [ "${2}" == "--push" ]; then
|
||||||
# output type=docker does not work with pushing
|
# output type=docker does not work with pushing
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,8 @@ if '*' not in ALLOWED_HOSTS and 'localhost' not in ALLOWED_HOSTS:
|
||||||
|
|
||||||
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
|
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
|
||||||
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
||||||
DATABASE = {
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
||||||
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
||||||
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
||||||
|
|
@ -78,6 +79,7 @@ DATABASE = {
|
||||||
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
|
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
|
||||||
# Disable the use of server-side cursors transaction pooling
|
# Disable the use of server-side cursors transaction pooling
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate
|
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate
|
||||||
# configuration exists for each. Full connection details are required in both sections, and it is strongly recommended
|
# configuration exists for each. Full connection details are required in both sections, and it is strongly recommended
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue