Go to file
Andreas Zweili c848c46637 add a service model 2022-04-01 18:44:42 +02:00
.github/workflows readd settings for the github tests 2022-02-07 23:04:45 +01:00
.vscode use python3 explicitly 2022-03-01 09:33:27 +01:00
backups format with black 2022-03-27 14:50:44 +02:00
computers format with black 2022-03-27 14:50:44 +02:00
core remove unused import 2022-03-27 14:54:35 +02:00
customers add a project manager to customers 2022-03-29 22:03:43 +02:00
devices line length 2022-03-27 14:54:43 +02:00
docs update the todos 2020-07-05 14:07:46 +02:00
licenses format with black 2022-03-27 14:50:44 +02:00
nets format with black 2022-03-27 14:50:44 +02:00
network_inventory add the allowed hosts dynamically 2022-03-27 16:13:34 +02:00
nginx add a nginx container as a reverse proxy 2020-02-15 17:58:16 +01:00
requirements add django-model-utils 2022-03-23 21:42:37 +01:00
softwares add a service model 2022-04-01 18:44:42 +02:00
users merge ad- and mail-groups into one 2022-03-30 23:52:44 +02:00
.coveragerc ignore the admin views in te coverage report 2020-03-01 12:42:59 +01:00
.dir-locals.el add the pytest options to the dir-locals 2020-05-01 12:49:05 +02:00
.env-example use the production settings in the example 2022-03-29 21:11:37 +02:00
.envrc move the ENV variable to the nix-shell 2022-03-01 10:04:34 +01:00
.flake8 reformat the flake8 config 2020-03-01 12:42:43 +01:00
.gitignore ignore all venv 2022-03-01 09:33:12 +01:00
.gitlab-ci.yml try a hack 2020-07-17 17:12:29 +02:00
Dockerfile pin the Python version in the docker images 2022-02-07 22:35:14 +01:00
LICENSE Initial commit 2017-12-21 23:11:33 +01:00
Makefile try ram tests again 2022-03-31 00:10:18 +02:00
README.md update status badge 2022-02-07 21:45:48 +01:00
conftest.py format with black 2022-03-27 14:50:44 +02:00
docker-compose-development.yml remove the docker development environment 2022-02-07 22:27:59 +01:00
docker-compose.yml pin the Python version in the docker images 2022-02-07 22:35:14 +01:00
flake.lock add django-model-utils 2022-03-23 21:42:37 +01:00
flake.nix adding dev packages for emacs 2022-03-27 14:24:48 +02:00
manage.py format with black 2022-03-27 14:50:44 +02:00
network_inventory.yaml remove some unused fixtures 2021-12-30 18:55:06 +01:00
pyproject.toml add a pyproject.toml to customize black 2022-03-27 14:44:54 +02:00
pytest.ini set junit_family to the new xunit2 2020-04-21 18:51:50 +02:00
run.sh expand fixtures 2021-12-30 16:10:04 +01:00

README.md

network_inventory

.github/workflows/publish.yml

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

Local Development Setup

The local setup is mainly intended to run the tests quickly. I recommend that you use the Docker setup if you want to interact with the website.

  1. Run make local to create the virtual environment for development. You're now all set to start developing.

Docker Development Setup

This is very similar to the production setup with the difference that the image for the web application gets built locally instead of getting pulled from Dockerhub.

  1. Run make to start the server. You can access it at http://localhost . You're now all set to start working.
  2. If you want to have some example data to work with run the command make init after you successfully run make.

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.

Documentation

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