Go to file
Andreas Zweili 5749da2ddf Update flake 2022-12-06 21:30:01 +01:00
.github Change cache name 2022-11-30 23:03:41 +01:00
.vscode use python3 explicitly 2022-03-01 09:33:27 +01:00
docs extend RM diagramm 2022-04-01 18:43:46 +02:00
nginx add a nginx container as a reverse proxy 2020-02-15 17:58:16 +01:00
src Update htmx 2022-11-28 18:19:39 +01:00
.coveragerc ignore the admin views in te coverage report 2020-03-01 12:42:59 +01:00
.dir-locals.el Update emacs dir variables 2022-11-22 14:14:36 +01: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 Move more files to src 2022-11-27 18:06:17 +01:00
.gitignore Ignore the nix build result 2022-11-28 22:50:50 +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 Remove test from Makefile 2022-11-27 21:38:37 +01:00
README.md Extend README 2022-11-27 16:49:40 +01:00
docker-compose-development.yml remove the docker development environment 2022-02-07 22:27:59 +01:00
docker-compose.yml get the image from github 2022-02-08 15:20:58 +01:00
flake.lock Update flake 2022-12-06 21:30:01 +01:00
flake.nix Get rid of a depricated warning 2022-11-27 21:56:11 +01:00
poetry.lock Add various dev tools 2022-11-22 12:31:45 +01:00
poetry.toml Add a poetry.toml with project specific settings 2022-11-16 21:34:11 +01:00
pyproject.toml Include the whole src directory in the poetry package 2022-11-27 21:19:44 +01:00
pytest.ini ignore warnings for the moment 2022-04-04 16:39:48 +02:00
run.sh Correct the shebang for the container run script 2022-11-28 22:51:03 +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

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 make. 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.

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.