mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-12-10 05:42:36 +00:00
Compare commits
5 commits
1b6a69e6b8
...
ae17c60de0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae17c60de0 | ||
|
|
1d8a31be83 | ||
|
|
109ef8afd2 | ||
|
|
7c22dd8656 | ||
|
|
477decd80a |
|
|
@ -46,8 +46,10 @@ RUN \
|
||||||
ARG FROM
|
ARG FROM
|
||||||
FROM ${FROM} AS main
|
FROM ${FROM} AS main
|
||||||
|
|
||||||
|
ARG NGINX_KEYRING_SHA256_SUM=7d3d5a7adf37e17d6882e2f6f55324b9a8f978ef3c99c50fe801af67c9847c91
|
||||||
|
# hadolint ignore=DL3020
|
||||||
|
ADD --chown=0:0 --chmod=444 --checksum=sha256:${NGINX_KEYRING_SHA256_SUM} https://unit.nginx.org/keys/nginx-keyring.gpg /usr/share/keyrings/nginx-keyring.gpg
|
||||||
COPY docker/unit.list /etc/apt/sources.list.d/unit.list
|
COPY docker/unit.list /etc/apt/sources.list.d/unit.list
|
||||||
ADD --chmod=444 --chown=0:0 https://unit.nginx.org/keys/nginx-keyring.gpg /usr/share/keyrings/nginx-keyring.gpg
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update -qq \
|
&& apt-get update -qq \
|
||||||
&& apt-get upgrade \
|
&& apt-get upgrade \
|
||||||
|
|
|
||||||
|
|
@ -64,19 +64,21 @@ 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 = {
|
||||||
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
'default': {
|
||||||
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
|
||||||
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
'USER': environ.get('DB_USER', ''), # PostgreSQL username
|
||||||
# PostgreSQL password
|
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
|
||||||
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
|
# PostgreSQL password
|
||||||
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
|
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
|
||||||
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
|
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
|
||||||
# Database connection SSLMODE
|
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
|
||||||
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
|
# Database connection SSLMODE
|
||||||
# Max database connection age
|
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
|
||||||
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
|
# Max database connection age
|
||||||
# Disable the use of server-side cursors transaction pooling
|
'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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue