Configuring main.hco or hatswelconfig.xml file outside the HATS ear

To understand more about this optional feature check below link:

  • Make sure to have the corresponding hco and hatswelcfg.xml file in the same location in Docker file.

  • Below commands have to be included in the main Docker file to configure connection files (main.hco) outside the ear( refer here for the sample Docker file):


#set user to root to run mkdir
USER root

#Below lines are used to create folder in HATS_CONFIG_ENV environemnt variable path to configure main.hco file outside the HATS Project
RUN mkdir -p /home/connection/HatsProj/connections
COPY --chown=1001:0 main.hco /home/connection/HatsProj/connections/main.hco

RUN mkdir -p /home/connection/HatsProj/welconfig
COPY --chown=1001:0 hatswelcfg.xml /home/connection/HatsProj/welconfig/hatswelcfg.xml

ENV HATS_CONFIG_ENV=/home/connection

#set user to 1001 back before starting the container. It is important to set the appropriate user for security reasons.
USER 1001

Note : If user is configuring main.hco file outside the HATS ear,to secure HATS project with SSL or TLS, make sure to add the jks/p12 file in Docker container and the file path should be provided inside main.hco.