Skip to content

Commit f64684a

Browse files
authored
Merge branch 'master' into patch-2
2 parents ee9d17f + cd191b4 commit f64684a

File tree

9 files changed

+38
-13
lines changed

9 files changed

+38
-13
lines changed

.github/workflows/external_trigger.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
2424
FAILURE_REASON="Can't retrieve external version for netbox branch master"
25+
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-netbox/actions/runs/${{ github.run_id }}"
2526
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
26-
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
27+
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
2728
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
2829
exit 1
2930
fi

.github/workflows/greetings.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-netbox/blob/master/.github/ISSUE_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-netbox/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-netbox/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
1212
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-netbox/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_trigger_scheduler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
22

33
on:
44
schedule:
5-
- cron: '31 8 * * 2'
5+
- cron: '51 9 * * 5'
66
workflow_dispatch:
77

88
jobs:

Jenkinsfile

+18-1
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,30 @@ pipeline {
265265
fi
266266
mkdir -p ${TEMPDIR}/gitbook
267267
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
268-
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
268+
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
269269
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
270270
cd ${TEMPDIR}/gitbook/docker-documentation/
271271
git add images/docker-${CONTAINER_NAME}.md
272272
git commit -m 'Bot Updating Documentation'
273273
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
274274
fi
275+
mkdir -p ${TEMPDIR}/unraid
276+
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
277+
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
278+
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
279+
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml
280+
fi
281+
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
282+
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
283+
echo "Image is on the ignore list, skipping Unraid template upload"
284+
else
285+
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
286+
cd ${TEMPDIR}/unraid/templates/
287+
git add unraid/${CONTAINER_NAME}.xml
288+
git commit -m 'Bot Updating Unraid Template'
289+
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
290+
fi
291+
fi
275292
rm -Rf ${TEMPDIR}'''
276293
script{
277294
env.FILES_UPDATED = sh(

README.md

+7-3
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 |
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) |
136139
| `-e DB_NAME=<DB_NAME>` | Databaes 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 post (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.

package_versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ py3-olefile-0.46-r4
5252
py3-ordered-set-4.0.1-r0
5353
py3-packaging-20.4-r0
5454
py3-parsing-2.4.7-r0
55-
py3-pillow-7.1.2-r0
55+
py3-pillow-7.1.2-r1
5656
py3-setuptools-47.0.0-r0
5757
py3-six-1.15.0-r0
5858
python3-3.8.5-r0
@@ -62,7 +62,7 @@ shadow-4.8.1-r0
6262
sqlite-libs-3.32.1-r0
6363
ssl_client-1.31.1-r19
6464
tiff-4.1.0-r0
65-
tzdata-2020c-r1
65+
tzdata-2020f-r0
6666
uwsgi-2.0.18-r8
6767
uwsgi-python3-2.0.18-r8
6868
xz-5.2.5-r0

readme-vars.yml

+5-3
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" }
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)" }
2728
- { 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 post (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: "TZ", env_value: "<TZ>", desc: "Timezone (i.e., America/New_York)" }
@@ -45,4 +46,5 @@ app_setup_block: |
4546
4647
# changelog
4748
changelogs:
49+
- { date: "02.01.21:", desc: "Added BASE_PATH environment variable." }
4850
- { date: "23.08.20:", desc: "Initial Release." }

root/defaults/configuration.py

+1-1
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

+1
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)