You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Andreas Zweili 59c949c9c0
Merge pull request #106 from Nebucatnetzer/dev
Remove unused package
3 months ago
.github Remove unused variable from workflow 3 months ago
.vscode use python3 explicitly 1 year ago
docs extend RM diagramm 12 months ago
nginx add a nginx container as a reverse proxy 3 years ago
src Get the postgres password from the env variable 3 months ago
.coveragerc ignore the admin views in te coverage report 3 years ago
.dir-locals.el Update emacs dir variables 4 months ago
.env-example use the production settings in the example 1 year ago
.envrc move the ENV variable to the nix-shell 1 year ago
.flake8 Move more files to src 4 months ago
.gitignore Ignore the static folder 3 months ago
.gitlab-ci.yml try a hack 3 years ago
LICENSE Initial commit 5 years ago Replace the Makefile 3 months ago Replace the Makefile 3 months ago
docker-compose-development.yml remove the docker development environment 1 year ago
docker-compose.yml Get the postgres password from the env variable 3 months ago
flake.lock Update flake 4 months ago
flake.nix Replace the Makefile 3 months ago
poetry.lock Remove unused package 3 months ago
poetry.toml Add a poetry.toml with project specific settings 4 months ago
pyproject.toml Remove unused package 3 months ago
pytest.ini ignore warnings for the moment 12 months ago



I started this project in order to have solution for keeping an inventory over my various servers and other network equipment.

Production Setup

  1. Clone the repository
  2. Copy the .env-example file to .env and change the POSTGRES_PASSWORD and DJANGO_SECRET_KEY variables to something secure.
  3. Run docker-compose up and connect to http://localhost

Development Setup

There are two ways to work on this project. For the first one you will need to install the Nix package manager1. Afterwards you can enter the development environment with nix develop.

For the other way you have to install poetry2 and then run poetry shell to enter the virtual environment.

Please note that I will only use and test the first method.

After you've entered the development environment with either method you can start the server. With the nix version you can start it with dev run. With poetry ./ run. This will start a PostgreSQL database running inside a docker container and start the Django development server. You can then access it in the browser under the FQDN of your computer. E.g. mypc.domain.local. Run the dev command without an argument to see all options.

Environment Variables

To customise the application in the Docker container you can use environment variables in the docker-compose.yml file. Currently the following variables are supported.

  • DJANGO_SECRET_KEY the secret key is mandatory, otherwise the application doesn't run. Make sure that it is some long random string.
  • DJANGO_DEBUG settings this variable to any value enables the Django debug mode. Make sure that you don't set it on a production server.
  • DJANGO_SETTINGS_MODULE the path to the settings file to use in the container. This requires a dotet syntax. The default is network_inventory.settings.docker.


Currently there isn't a lot of documentation present. I try to document my thoughts and other related information in the Notes file.