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

Re-add BASE_PATH #1389

Open
deliciouslytyped opened this issue Feb 8, 2025 · 3 comments
Open

Re-add BASE_PATH #1389

deliciouslytyped opened this issue Feb 8, 2025 · 3 comments

Comments

@deliciouslytyped
Copy link

deliciouslytyped commented Feb 8, 2025

Release 2.6.1 ( #1002 ) removed the BASE_PATH variable exposed by netbox-docker (but which exists in upstream netbox) with commit 155e90c because it wasn't sufficient to set up netbox under a different path correctly. #650 (comment) describes how to do it.

@cimnine
Copy link
Collaborator

cimnine commented Feb 8, 2025

You have to put a process in place to overwrite / mount a different nginx unit config anyway, so there's little reason to include BASE_PATH again in the default config. It's perfectly fine to use an extra.py configuration file for this.

So, IMHO, there's no real benefit here. But there is a real drawback, since people will assume that BASE_PATH just works and will be disappointed when it doesn't (and possibly file issues).

@deliciouslytyped
Copy link
Author

I don't know why you have to overwrite or mount the nginx unit config? Maybe you have something in mind other than I do.
I'm not familiar with nginx unit configuration and njs.

I didn't read carefully, but it seems like maybe indeed you can't just load an environment variable in unit/njs?: nginx/unit#968

@deliciouslytyped
Copy link
Author

deliciouslytyped commented Feb 8, 2025

njs itself does seem to have access to environment variables with process.env, so I guess the question is whether it will work correctly at the correct phase of configuration where it is in the config file, informed by whatever is up in that linked issue.

xref
https://unit.nginx.org/scripting/
https://nginx.org/en/docs/njs/reference.html#process

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

No branches or pull requests

2 participants