Configuring runtime.properties file outside the ZIETrans ear
To understand more about this feature follow below link:
-
Download the copyruntime.sh and wrapper.sh file from here
-
Below is the docker file to configure runtime.properties files outside the ear ( refer here for the sample Docker file):
USER root
# Set the environment variable path. You can also set this variable during the deployment time.
ENV ZIETRANS_RUNTIME_CFG_ENV=/home/runtime
#Create a folder with name runtime and copy runtime.properties file inside that folder
RUN mkdir -p /runtime
ADD runtime.properties /runtime
# Create folder in environemnt variable path to keep runtime.properties outside the ZIETrans EAR. Here ZIETransProj is the contextroot of ZIETrans ear.
RUN mkdir -p /home/runtime/ZIETransProj
RUN chmod -R 777 /home/runtime/ZIETransProj
# copyruntime.sh is to copy runtime.properties files after the container volumes are mounted
COPY --chown=1001:0 copyruntime.sh /
RUN chmod +x /copyruntime.sh
# After container starts, the wrapper.sh will be running to execute copyruntime.sh and start underlying liberty server.
COPY --chown=1001:0 wrapper.sh /
RUN chmod +x /wrapper.sh
USER 1001
CMD ["sh", "/wrapper.sh"]
Note: If user do not intend to enable remote admin console support or scaling, user must comment out the line "/updatepod.sh" in the wrapper.sh file.