docker
docker copied to clipboard
Support tomcat root
Hi. Thank you for the PR. Could you add a small section to the README to explain this new feature?
@reinout thank you for the comments and suggestions.
While my proposed change (with a couple of fixes) works ok for building a custom image, I'd like to try another approach that allows someone to change the context path after the image is built instead. I think that I can do this by either: turning off autodeploy and deployonstartup in server.xml and changing the context.xml or by moving the geoserver webapp files out of the /webapp path and altering the context.xml (according to tomcat 9 docs).
Is one of these approaches preferred? Also, should I close this pull request and start fresh, or just make those changes to this pull request branch?
This version keeps all of the geoserver files in /webapps/geoserver, but changes the context path by setting the docBase and path attributes in a context element in server.xml.
AFAIK, this is the only way to accomplish this without moving the docBase for the app context out of the host's appBase.
From the Tomcat docs:
If you want to deploy a WAR file or a directory using a context path that is not related to the base file name then one of the following options must be used to prevent double-deployment:
Disable autoDeploy and deployOnStartup and define all Contexts in server.xml Locate the WAR and/or directory outside of the Host's appBase and use a context.xml file with a docBase attribute to define it.
Some relevant Tomcat 9 documentation is here: naming defining a context
@csbarnet I lost sight of that a little, sorry. But now I had a deeper look and could successfully test it locally. I really like the feature.
So this can be merged from your perspective?
works like charm on my k8s as well. A healthcheck which can be filtered or does not appear in the monitor would be nice. I think the former with the image is a bit light and this one is a bit heavy (and appears in the monitor). Not sure if I missed it but have not seen any healthcheck implemented into geoserver. I think this would be great and could maybe also include datasources.
Seems we have merge conflicts now, so this has to be resolved
Great! I'll take a look at the merge conflicts in the next day or two.
@buehner, I finally got around to fixing the merge conflicts. I'm currently testing.
@csbarnet Thx a lot. I also tested this again and it works fine for me. I am ready to merge this if your testing was also fine? Just let me know
@buehner My testing was also fine. thank you!