Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to change context root when using Docker Compose


    Jim W
    • Features: Repository Version: v8.0.1 Product: JasperReports® Server

    Description

    By default, you would log into jasperserver using the default webapp name, e.g.

    http://localhost:8080/jasperserver-pro

    Suppose you want to change it to,

    http://localhost:8080/myWebSite

    There is a standard set of files you need to change when dealing with a generic jasperserver installation.  The procedure will need to be modified when you are using Docker Compose.

    Instructions

    First, you will need to get familiar with the main guide here.

    https://github.com/TIBCOSoftware/js-docker

    Second, review the image build process.  Preferably try it a couple of times to be familiar with the process.

    https://github.com/TIBCOSoftware/js-docker/tree/main/jaspersoft-containers/Docker/jrs#deploying-jasperreports-server-and-scalable-query-engine

    You may skip the steps related to scalableQueryEngine if you want to deploy just jasperserver.

    Then when you are more comfortable with Docker Compose, you can proceed to customizing images.

    You would customize the image with the following steps. These changes rely on customization of features we introduced in the jaspersoft-containers project link above.


    1. These steps should be performed before building the image, and after the step when you did ./unpackWARInstaller.sh

    mkdir /tmp/jrs
    cd /tmp/jrs
    unzip /opt/docker/js-docker/jasperreports-server-pro-8.1.0-bin/jasperserver-pro.war


    2. edit /tmp/jrs/WEB-INF/web.xml

    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>jasperserver.root</param-value>
    </context-param>

    to

    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>myWebSite.root</param-value>
    </context-param>

    3. edit /tmp/jrs/WEB-INF/js.quartz.properties, set

    report.scheduler.web.deployment.uri=http://localhost:8080/myWebSite

    4. edit /tmp/jrs/WEB-INF/js.diagnostic.properties, set

    diagnostic.name = myWebSite

    5. create folder customizations folder:

    cd /opt/docker/js-docker/jaspersoft-containers/Docker/jrs/resources/jasperserver-customization
    mkdir -p webapps/jasperserver-pro/WEB-INF

    6. copy edited files

    cd /opt/docker/js-docker/jaspersoft-containers/Docker/jrs/resources/jasperserver-customization/webapps/jasperserver-pro/WEB-INF
    cp /tmp/jrs/WEB-INF/web.xml /tmp/jrs/WEB-INF/js.quartz.properties /tmp/jrs/WEB-INF/js.diagnostic.properties ./

    7. edit Docker/jrs/Dockerfile

    In the line before EXPOSE 8080 8443, add

    RUN mv $CATALINA_HOME/webapps/jasperserver-pro $CATALINA_HOME/webapps/myWebSite

    8. now you can build images using Docker Compose and then start jasperserver using Docker Compose


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...