retrievercommunications / docker-jasperserver

Docker image for the community edition of JasperReports® Server.
https://hub.docker.com/r/retriever/jasperserver/
MIT License
46 stars 50 forks source link

Default Tomcat web application #4

Closed cemo closed 7 years ago

cemo commented 7 years ago

Hey thanks for sharing your repo. Is there an easy way to make jasper as a default application? Currently it requires jasperserver in context.

grange74 commented 7 years ago

Hi, The quickest way i found to change this was to set the "webAppNameCE" config parameter to ROOT in the default_master.properties via the current "entrypoint.sh" which results in the war file being deployed to tomcat's webapps directory as ROOT.war which then tells tomcat to serve it as the default application. This change would mean that the application would be accessible through http://${dockerHost}:8080/ instead of the current http://${dockerHost}:8080/jasperserver/. I'm happy to make this change but i just want to confirm that this will satisfy what you are after?

cemo commented 7 years ago

Hey @grange74, this is definitely what I need.

tariellaelius commented 6 years ago

Unfortunately, setting "webAppNameCE" to ROOT means now the app is re-deployed every time the container is restarted because of this line, thereby removing all the files (e.g. custom font extensions and other custom jar files) that are manually added to application directories.

grange74 commented 6 years ago

Thank you for spotting that. I will create a separate issue and look to fix it. Obviously PRs are welcome too.

tariellaelius commented 6 years ago

Yeah, I spent some time trying to figure out why font extensions wouldn't work on the server. I fixed the issue by reverting to the original form - deploying the app to jasperserver directory. On the other hand, if one wants to deploy it as the root app, I would suggest putting a special file in the container file system, for example in the root directory, something like .do_deploy_jasperserver during the container build phase. Then, in entrypoint.sh check for the existence of that file, instead of the jasperserver directory. If the deployment went successfully, the script would remove the file. In this case, the app can be easily re-deployed when necessary by simply creating such a file in the file system and restarting the container.