You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Andreas Zweili 956f2fb889 update the todos 13 hours ago
.vscode use 4 cpu core when running tests with vscode 2 months ago
backups add create and delete views for backups 6 days ago
computers add create and delete views for RAIDs 6 days ago
core add test for verbose name filter 2 weeks ago
customers correct the order of the customer fields 3 weeks ago
devices add a Manufacturer detail view 3 weeks ago
docs update the todos 13 hours ago
licenses change the url format for the ComputerLicenseCreateView 6 days ago
nets show all models in the admin interface 3 weeks ago
network_inventory correct the static files setup 2 months ago
nginx add a nginx container as a reverse proxy 4 months ago
requirements update django to 2.2.13 2 weeks ago
softwares show all models in the admin interface 3 weeks ago
users show all models in the admin interface 3 weeks ago
.coveragerc ignore the admin views in te coverage report 4 months ago
.dir-locals.el add the pytest options to the dir-locals 2 months ago
.env-example disable debugging mode in the example .env file 4 months ago
.flake8 reformat the flake8 config 4 months ago
.gitignore correct the static files setup 2 months ago
.travis.yml copy the .env file before building the container 4 months ago
Dockerfile add CMD to Dockerfile 1 day ago
LICENSE Initial commit 2 years ago
Makefile correct the order of the clean commands 1 day ago
README.md update the todos 13 hours ago
conftest.py remove the names of some overly large capitalists 3 months ago
docker-compose-development.yml remove the port mapping from the web app 1 day ago
docker-compose.yml remove the port mapping from the web app 1 day ago
manage.py restructure the project 6 months ago
network_inventory.yaml clean out the test data fixture 2 weeks ago
pytest.ini set junit_family to the new xunit2 2 months ago
run.sh create the second_run file inside the container 1 day ago

README.md

network_inventory

Build Status

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.