Skip to content

Commit e628c8c

Browse files
Merge branch 'master' into remote-auth-conf
2 parents 1a971aa + 2a6860b commit e628c8c

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ services:
7979
- SUPERUSER_EMAIL=<SUPERUSER_EMAIL>
8080
- SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD>
8181
- ALLOWED_HOST=<ALLOWED_HOST>
82+
- BASE_PATH=<BASE_PATH>
8283
- DB_NAME=<DB_NAME>
8384
- DB_USER=<DB_USER>
8485
- DB_PASSWORD=<DB_PASSWORD>
@@ -105,6 +106,7 @@ docker run -d \
105106
-e SUPERUSER_EMAIL=<SUPERUSER_EMAIL> \
106107
-e SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD> \
107108
-e ALLOWED_HOST=<ALLOWED_HOST> \
109+
-e BASE_PATH=<BASE_PATH> \
108110
-e DB_NAME=<DB_NAME> \
109111
-e DB_USER=<DB_USER> \
110112
-e DB_PASSWORD=<DB_PASSWORD> \
@@ -132,13 +134,14 @@ Container images are configured using parameters passed at runtime (such as thos
132134
| `-e PGID=1000` | for GroupID - see below for explanation |
133135
| `-e SUPERUSER_EMAIL=<SUPERUSER_EMAIL>` | Username for admin account |
134136
| `-e SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD>` | Password for admin account |
135-
| `-e ALLOWED_HOST=<ALLOWED_HOST>` | The hostname you will use to access the app (i.e., netbox.example.com |
136-
| `-e DB_NAME=<DB_NAME>` | Databaes name (optional, default: netbox) |
137+
| `-e ALLOWED_HOST=<ALLOWED_HOST>` | The hostname you will use to access the app (i.e., netbox.example.com) |
138+
| `-e BASE_PATH=<BASE_PATH>` | The path you will use to access the app (i.e., /netbox, optional, default: none) |
139+
| `-e DB_NAME=<DB_NAME>` | Database name (optional, default: netbox) |
137140
| `-e DB_USER=<DB_USER>` | Database user |
138141
| `-e DB_PASSWORD=<DB_PASSWORD>` | Database password |
139-
| `-e DB_HOST=<DB_HOST>` | Database post (optional, default: postgres |
142+
| `-e DB_HOST=<DB_HOST>` | Database host (optional, default: postgres) |
140143
| `-e DB_PORT=<DB_PORT>` | Database port (optional) |
141-
| `-e REDIS_HOST=<REDIS_HOST>` | Redis host (optional, default: redis |
144+
| `-e REDIS_HOST=<REDIS_HOST>` | Redis host (optional, default: redis) |
142145
| `-e REDIS_PORT=<REDIS_PORT>` | Redis port number (optional, default: 6379) |
143146
| `-e REDIS_PASSWORD=<REDIS_PASSWORD>` | Redis password (optional, default: none) |
144147
| `-e TZ=<TZ>` | Timezone (i.e., America/New_York) |
@@ -252,4 +255,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
252255

253256
## Versions
254257

258+
* **02.01.21:** - Added BASE_PATH environment variable.
255259
* **23.08.20:** - Initial Release.

readme-vars.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ param_usage_include_env: true
2323
param_env_vars:
2424
- { env_var: "SUPERUSER_EMAIL", env_value: "<SUPERUSER_EMAIL>", desc: "Username for admin account" }
2525
- { env_var: "SUPERUSER_PASSWORD", env_value: "<SUPERUSER_PASSWORD>", desc: "Password for admin account" }
26-
- { env_var: "ALLOWED_HOST", env_value: "<ALLOWED_HOST>", desc: "The hostname you will use to access the app (i.e., netbox.example.com" }
27-
- { env_var: "DB_NAME", env_value: "<DB_NAME>", desc: "Databaes name (optional, default: netbox)" }
26+
- { env_var: "ALLOWED_HOST", env_value: "<ALLOWED_HOST>", desc: "The hostname you will use to access the app (i.e., netbox.example.com)" }
27+
- { env_var: "BASE_PATH", env_value: "<BASE_PATH>", desc: "The path you will use to access the app (i.e., /netbox, optional, default: none)" }
28+
- { env_var: "DB_NAME", env_value: "<DB_NAME>", desc: "Database name (optional, default: netbox)" }
2829
- { env_var: "DB_USER", env_value: "<DB_USER>", desc: "Database user" }
2930
- { env_var: "DB_PASSWORD", env_value: "<DB_PASSWORD>", desc: "Database password" }
30-
- { env_var: "DB_HOST", env_value: "<DB_HOST>", desc: "Database post (optional, default: postgres" }
31+
- { env_var: "DB_HOST", env_value: "<DB_HOST>", desc: "Database host (optional, default: postgres)" }
3132
- { env_var: "DB_PORT", env_value: "<DB_PORT>", desc: "Database port (optional)" }
32-
- { env_var: "REDIS_HOST", env_value: "<REDIS_HOST>", desc: "Redis host (optional, default: redis" }
33+
- { env_var: "REDIS_HOST", env_value: "<REDIS_HOST>", desc: "Redis host (optional, default: redis)" }
3334
- { env_var: "REDIS_PORT", env_value: "<REDIS_PORT>", desc: "Redis port number (optional, default: 6379)" }
3435
- { env_var: "REDIS_PASSWORD", env_value: "<REDIS_PASSWORD>", desc: "Redis password (optional, default: none)" }
3536
- { env_var: "REMOTE_AUTH_ENABLED", env_value: "<REMOTE_AUTH_ENABLED>", desc: "Enable remote authentication (optional, default: False" }
@@ -52,4 +53,5 @@ app_setup_block: |
5253
# changelog
5354
changelogs:
5455
- { date: "03.02.21:", desc: "Added remote authentication environment variables." }
55-
- { date: "23.08.20:", desc: "Initial Release." }
56+
- { date: "02.01.21:", desc: "Added BASE_PATH environment variable." }
57+
- { date: "23.08.20:", desc: "Initial Release." }

root/defaults/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
# Base URL path if accessing NetBox within a directory. For example, if installed at http://example.com/netbox/, set:
8585
# BASE_PATH = 'netbox/'
86-
BASE_PATH = ''
86+
BASE_PATH = '{{BASE_PATH}}'
8787

8888
# Cache timeout in seconds. Set to 0 to dissable caching. Defaults to 900 (15 minutes)
8989
CACHE_TIMEOUT = 900

root/etc/cont-init.d/50-config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mkdir -p /config/scripts
44

55
declare -A NETBOX_CONF
66
NETBOX_CONF[ALLOWED_HOST]=${ALLOWED_HOST:-netbox.example.com}
7+
NETBOX_CONF[BASE_PATH]=${BASE_PATH:-}
78
NETBOX_CONF[DB_NAME]=${DB_NAME:-netbox}
89
NETBOX_CONF[DB_USER]=${DB_USER:-root}
910
NETBOX_CONF[DB_PASSWORD]=${DB_PASSWORD:-}

0 commit comments

Comments
 (0)