mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-28 12:11:08 +02:00
.vscode | ||
backups | ||
computers | ||
core | ||
customers | ||
devices | ||
docs | ||
licenses | ||
nets | ||
network_inventory | ||
nginx | ||
requirements | ||
softwares | ||
users | ||
.coveragerc | ||
.dir-locals.el | ||
.env-example | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.travis.yml | ||
conftest.py | ||
docker-compose-development.yml | ||
docker-compose.yml | ||
Dockerfile | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
Makefile | ||
manage.py | ||
network_inventory.yaml | ||
pytest.ini | ||
README.md | ||
run.sh |
network_inventory
I started this project in order to have solution for keeping an inventory over my various servers and other network equipment.
Production Setup
- Clone the repository
- Copy the
.env-example
file to.env
and change thePOSTGRES_PASSWORD
andDJANGO_SECRET_KEY
variables to something secure. - 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.
- 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.
- Run
make
to start the server. You can access it at http://localhost . You're now all set to start working. - If you want to have some example data to work with run the command
make init
after you successfully runmake
.
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.