From 64bc716107481adea28070d1b5ed8ea51917232b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Wed, 9 Oct 2019 12:04:36 +0200 Subject: [PATCH] Copied over the relevant parts from the README --- Configuration.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Configuration.md diff --git a/Configuration.md b/Configuration.md new file mode 100644 index 0000000..58eae22 --- /dev/null +++ b/Configuration.md @@ -0,0 +1,25 @@ +# Configuration + +You can configure the app using environment variables. +These are defined in `netbox.env`. +Read [Environment Variables in Compose][compose-env] to understand about the various possibilities to overwrite these variables. +(The easiest solution being simply adjusting that file.) + +To find all possible variables, have a look at the [configuration.py][docker-config] and [docker-entrypoint.sh][entrypoint] files. +Generally, the environment variables are called the same as their respective Netbox configuration variables. +Variables which are arrays are usually composed by putting all the values into the same environment variables with the values separated by a whitespace ("` `"). +For example defining `ALLOWED_HOSTS=localhost ::1 127.0.0.1` would allows access to Netbox through `http://localhost:8080`, `http://[::1]:8080` and `http://127.0.0.1:8080`. + +[compose-env]: https://docs.docker.com/compose/environment-variables/ + +## Configure for Production + +The default settings are optimized for (local) development environments. +You should therefore adjust the configuration for production setups, at least the following variables: + +* `ALLOWED_HOSTS`: Add all URLs that lead to your Netbox instance, space separated. E.g. `ALLOWED_HOSTS=netbox.mycorp.com server042.mycorp.com 2a02:123::42 10.0.0.42 localhost ::1 127.0.0.1` (It's good advice to always allow localhost connections for easy debugging, i.e. `localhost ::1 127.0.0.1`.) +* `DB_*`: Use your own persistent database. Don't use the default passwords! +* `EMAIL_*`: Use your own mailserver. +* `MAX_PAGE_SIZE`: Use the recommended default of 1000. +* `SUPERUSER_*`: Only define those variables during the initial setup, and drop them once the DB is set up. Don't use the default passwords! +* `REDIS_*`: Use your own persistent redis. Don't use the default passwords! \ No newline at end of file