-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
renewed attempt at dockerization #92
base: main
Are you sure you want to change the base?
Conversation
api_field_types and api_field_names rely on values from the Bugzilla->fields definition. This in turn requires checking the schema of the bugs table at run time. That means trying to access these when a database is not configured, or before schema migrations have happened is an error. This changes those variables to hold functions (sub refs) that are comptued when called. The help performance not degrade, we make use of the Bugzilla::request_cache to only re-compute this once per request.
f49e943
to
a00fcd3
Compare
@dylanwh i am curious why need to “ run Makefile.PL” ? Usually all compilation happens insider docker build, right ? |
What is a necessity of “BZ_urlbase”, if this is a bugzilla api URL , usually there is docker port mapping mechanism that would allow map docker tcp ports to the host ones, so would it not be enough just specify a port and then map it during docker run ? |
Side effect of two constraints:
So doing this requires generating the dockerfile. I intend on commiting the "default" configuration dockerfile to the repository, so nobody that it works normally for most people |
Two reasons really. Bugzilla has numerous protections from being improperly proxied to, and it uses the urlbase understand what requests are valid and which ones to reject. Some of this is implemented in the so-called Hostage middleware, and other parts exist in other parts of the code. The second reason is that it needs to know how to fully qualify urls in emails and other places outside of a web request context. I'd like to make this part of the onboarding/setup easier though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably needs a rebase, tests are failing, too. Think we're almost there though.
TODO:
To test, you can:
docker build . -t bugzilla
docker run --rm -e BZ_db_host=DATABASE -e BZ_urlbase=http://localhost:3000/ -e BZ_db_pass=bugs -ti bugzilla checksetup
docker run --rm -e BZ_db_host=DATABASE -e BZ_urlbase=http://localhost:3000/ -e BZ_db_pass=bugs -ti bugzilla daemon
-- this one should result in a running server.