Compare commits

...

7 Commits

Author SHA1 Message Date
df16a431ca Prepare Version 0.10.0
0.9.0 was already tagged without a version increment
2019-03-19 17:14:08 +01:00
585e411cde Prepare Version 0.9.0 2019-03-19 17:12:40 +01:00
e17baea76c Merge pull request #128 from ScanPlusGmbH/optimze-startup
Make startup scripts optional
2019-03-19 17:12:15 +01:00
8c95f32b0c Make startup scripts optional
To optimize the application boot time the startup scripts can now be
disabled by an ENV variable. The default when the variable is not set,
is to run the startup scripts. This means that the default behaviour is
not changed from earlier releases.
2019-03-11 12:31:41 +01:00
d4b394c999 Prepare 0.9.0 2019-02-22 14:03:42 +01:00
9c259adc88 Merge branch 'cimnine-update-django' 2019-02-22 13:53:49 +01:00
582064f4cd Loosen version pinning for Django
This change is in accordance with https://github.com/digitalocean/netbox/issues/2808
2019-02-22 13:52:37 +01:00
4 changed files with 12 additions and 6 deletions

View File

@ -25,7 +25,7 @@ RUN pip install \
# pinning django to the version required by netbox
# adding it here, to install the correct version of
# django-rq
'Django>=1.11,<2.1' \
'Django>=2.1.5,<2.2' \
# django-rq is used for webhooks
django-rq

View File

@ -144,6 +144,7 @@ You can also dynamically add any other report to this same directory and Netbox
### Custom Initialization Code (e.g. Automatically Setting Up Custom Fields)
When using `docker-compose`, all the python scripts present in `/opt/netbox/startup_scripts` will automatically be executed after the application boots in the context of `./manage.py`.
The execution of the startup scripts can be prevented by setting the environment variable `SKIP_STARTUP_SCRIPTS` to `true`, e.g. in the file `env/netbox.env`.
That mechanism can be used for many things, e.g. to create Netbox custom fields:
@ -378,6 +379,7 @@ 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:
* 0.9.0: Upgrade to at least 2.1.5
* 0.8.0: Alpine linux was upgraded to 3.9 [#126][126]
* 0.7.0: The value of the `MAX_PAGE_SIZE` environment variable was changed to `1000`, which is the default of Netbox.
* 0.6.0: The naming of the default startup_scripts were changed.

View File

@ -1 +1 @@
0.8.0
0.10.0

View File

@ -39,10 +39,14 @@ if not User.objects.filter(username='${SUPERUSER_NAME}'):
Token.objects.create(user=u, key='${SUPERUSER_API_TOKEN}')
END
for script in /opt/netbox/startup_scripts/*.py; do
echo "⚙️ Executing '$script'"
./manage.py shell --interface python < "${script}"
done
if [ "$SKIP_STARTUP_SCRIPTS" == "true" ]; then
echo "☇ Skipping startup scripts"
else
for script in /opt/netbox/startup_scripts/*.py; do
echo "⚙️ Executing '$script'"
./manage.py shell --interface python < "${script}"
done
fi
# copy static files
./manage.py collectstatic --no-input