Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports debugging in Docker Compose for netbox-qrcode #78

Closed
wants to merge 14 commits into from
Closed

Supports debugging in Docker Compose for netbox-qrcode #78

wants to merge 14 commits into from

Conversation

LHBL2003
Copy link
Contributor

@LHBL2003 LHBL2003 commented Jul 4, 2024

This request makes it possible to debug the netbox-qrcode environment in Visual Studio Code. I tried it months ago and now again. After a few days it finally worked. So please accept the pull request. As a lot of time has gone into this.
Thank you

Issues
#76

@LHBL2003 LHBL2003 requested review from k01ek, cruse1977 and natm as code owners July 4, 2024 12:30
@LHBL2003
Copy link
Contributor Author

LHBL2003 commented Jul 4, 2024

Hello @cruse1977,
You are also very active in netbox-qrcode. Would you like to check whether you can debug this project using my customization? You can find instructions in the README.md in the Debugging chapter. I would be happy if you could test this once to generate more support for the pull.
Thanks in advance.

…ting Docker-compose.

- Erweiterung der Dokumentation um die Orte wo die Anmeldedaten der Datenbank, PostgreSQL, Redis und Netbox zu finden sind.
- Introduction of a development chapter. Slight adjustment of the chapter levels.
@LHBL2003
Copy link
Contributor Author

LHBL2003 commented Jul 5, 2024

I have expanded it a little. When Docker-Compose is started, a user admin with the password admin is created for Netbox.
The script makesuperuser.py was deliberately placed in develop and is copied to netbox_qrcode at runtime, as it is only relevant for the test environment.
I would be delighted if you would take over the adjustments.

LHBL2003 and others added 2 commits July 5, 2024 21:12
… versteht welche Vorteile diese Datei hat.

- Im Makefile wurde debug-vscode hinzugefügt. Um mit Brakepoints debuggen zu können.
- README Development Part wurde nach dem neuen Wissensstand vereinfacht.
- Im Makefile wurden Kommentare hinzugefügt, damit ein neuling besser…
@LHBL2003
Copy link
Contributor Author

LHBL2003 commented Jul 5, 2024

Ok, I didn't know about Makefile yet. I have therefore integrated my VSCode debugging with breakpoints into it:

make debug-vscode

Summary of the changes just now..:

  • Comments have been added to the Makefile so that a newcomer can better understand the advantages of this file.
  • Added debug-vscode to the Makefile. To be able to debug with breakpoints.
  • README Development Part has been simplified according to the new state of knowledge.

@LHBL2003
Copy link
Contributor Author

LHBL2003 commented Jul 5, 2024

I'm sorry, I've learned a lot in the last few days. But I'd say I'm done now. This extension is intended to help with the further development of the plugin.

Summary of what has been done so far.

In the README a chapter for developers was created to get a better start if someone wants to help.

Makefile comments have been added and starting the VSCode debug mode.

The following files were created to support debugging in VSCode with breakpoints:
.dockerignore
.vscode/launch.json
.vscode/tasks.json
develop/docker-compose-debug.yml

The following files were created to achieve the automatic creation of the admin SuperUser user for Netbox:
develop/management/init.py
develop/management/commands/init.py
develop/management/commands/makesuperuser.py

The docker-compose.yml file has been adapted so that makesuperuser is also executed here.

The makesuperuser.py script is built in such a way that it checks whether a SuperUser has been created. If not, it is created. So if you start the container again, there is no error message that there is already a user.

I am therefore asking for a test now :D

@LHBL2003 LHBL2003 closed this Jul 15, 2024
@LHBL2003
Copy link
Contributor Author

Unfortunately, I had transferred all my suggestions for improvement to my Master. As I now want to add a third improvement, this is slowly becoming too much. Therefore I will make three branges out of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant